Можно ли отправить результаты теста Cucumber (JS) в Kiwi TCMS и изменить статус тестовых случаев? - PullRequest
0 голосов
/ 07 ноября 2019

У меня есть автоматизация тестирования Cucumber + nodejs. А результаты автоматизации сохраняются как junit-report.xml и testNg Report. Мы используем киви для тестовых случаев. я хочу добавить тестовый набор, идентификатор testrun на сторону огурца и изменить статус соответствующего идентификатора теста, если автоматические тестовые примеры не пройдены в огурце.

Ответы [ 2 ]

0 голосов
/ 11 ноября 2019

Пример сценария входа в систему огурца и результат выполненного теста как junit. Эти два теста доступны на киви. Я хочу отправить статус выполненных тестов в киви. Функция @login: Управление аутентификацией

Scenario: Login with invalid username and password
    Given I am on the Portia home page
    When I login with "Resman Priority" account username "invalidUsername" password "invalidPassword"
    Then I should see a bad login error "Error:"

Scenario: Login with Resman Priority account and check Admin Preferences Menu
    Given I am on the Portia home page
    When I login with "Resman Priority" account username "usernameResman" password "passwordResman"
    Then I should login
    And I should see my username
    And I should not see Admin Preference menu

<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
    <testsuite name="authentication-management;login-with-invalid-username-and-password" tests="3" failures="0" skipped="0">
        <properties>
            <property name="@login" value="true">
            </property>
            <property name="URI" value="C:\dev\cucumber-e2e-test\test\e2e\features\login.feature">
            </property>
        </properties>
        <testcase name="Given I am on the Portia home page" classname="authentication-management;login-with-invalid-username-and-password" time="3.8266756">
        </testcase>
        <testcase name="When I login with &quot;Resman Priority&quot; account username &quot;invalidUsername&quot; password &quot;invalidPassword&quot;" classname="authentication-management;login-with-invalid-username-and-password" time="0.135447099">
        </testcase>
        <testcase name="Then I should see a bad login error &quot;Error:&quot;" classname="authentication-management;login-with-invalid-username-and-password" time="0.0003946">
        </testcase>
    </testsuite>
    <testsuite name="authentication-management;login-with-resman-priority-account-and-check-admin-preferences-menu" tests="5" failures="0" skipped="0">
        <properties>
            <property name="@login" value="true">
            </property>
            <property name="URI" value="C:\dev\cucumber-e2e-test\test\e2e\features\login.feature">
            </property>
        </properties>
        <testcase name="Given I am on the Portia home page" classname="authentication-management;login-with-resman-priority-account-and-check-admin-preferences-menu" time="3.1795375">
        </testcase>
        <testcase name="When I login with &quot;Resman Priority&quot; account username &quot;usernameResman&quot; password &quot;passwordResman&quot;" classname="authentication-management;login-with-resman-priority-account-and-check-admin-preferences-menu" time="0.146646599">
        </testcase>
        <testcase name="Then I should login" classname="authentication-management;login-with-resman-priority-account-and-check-admin-preferences-menu" time="0.6696968">
        </testcase>
        <testcase name="And I should see my username" classname="authentication-management;login-with-resman-priority-account-and-check-admin-preferences-menu" time="0.0635387">
        </testcase>
        <testcase name="And I should not see Admin Preference menu" classname="authentication-management;login-with-resman-priority-account-and-check-admin-preferences-menu" time="0.018977601">
        </testcase>
    </testsuite>
        <properties>
            <property name="@login" value="true">
            </property>
            <property name="URI" value="C:\dev\cucumber-e2e-test\test\e2e\features\login.feature">
            </property>
        </properties>
        <testcase name="Given I am on the Portia home page" classname="authentication-management;after-your-login,-you&apos;ll-be-redirected-url" time="3.1641503">
        </testcase>
        <testcase name="When I login with &quot;Resman Priority&quot; account username &quot;usernameResman&quot; password &quot;passwordResman&quot;" classname="authentication-management;after-your-login,-you&apos;ll-be-redirected-url" time="0.143332">
        </testcase>
        <testcase name="Then I should login" classname="authentication-management;after-your-login,-you&apos;ll-be-redirected-url" time="0.6617511">
        </testcase>
        <testcase name="And I should redirected to url" classname="authentication-management;after-your-login,-you&apos;ll-be-redirected-url" time="0.000532401">
        </testcase>
    </testsuite>
</testsuites>
0 голосов
/ 08 ноября 2019

пожалуйста, предоставьте больше информации b / c между языковым барьером и расплывчатыми описаниями. Я не совсем уверен, в чем ваша проблема. Вот некоторые факты:

  • Для Kiwi TCMS нет плагина / парсера Cucumber, так как до сих пор никто не просил об этом. Пожалуйста, откройте проблему на GitHub, чтобы мы могли отслеживать этот запрос и работать над ним.

  • Существует анализатор junit.xml, примеры использования см. В https://github.com/kiwitcms/junit.xml-plugin. .

Предоставьте пример вывода из Cucumber, а также ваш файл junit-report.xml, чтобы мы могли лучше видеть, что происходит. Текущий синтаксический анализатор сопоставляет тестовые примеры по имени, поэтому, если что-то не получится в вашем автоматизированном тестовом наборе, об этом также будет сообщено как о сбое в Kiwi TCMS.

Я не уверен, что это именно то, что вы хотите. Может быть, приведите еще несколько примеров того, как, по вашему мнению, это должно выглядеть, чтобы мы могли это выяснить.

...