Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code

The following code and the setup instructions were inspired on from the CodeceptJS startup tutorial.

...

Our Feature contains 3 Scenarios, where the last one was intended is set up to intentionally fail on purpose.

Code Block
languagejs
titleMy First Test_test.js
Feature('My First Test');

Scenario('google welcome page', (I) => {
  I.amOnPage('/');
  I.see('Google offered in');
});


Scenario('search for Xray should return link to Marketplace', (I) => {
  I.amOnPage('/');
  I.dontSeeElement('#todo-count');
  I.fillField({id: 'lst-ib'}, 'Xray test management');
  I.pressKey('Enter');
  I.see('Xray - Test Management for Jira | Atlassian Marketplace', '#rcnt');
});


Scenario('search for tests should return Xray', (I) => {
  I.fillField({id: 'lst-ib'}, 'tests');
  I.pressKey('Enter');
  I.see('Xray - Test Management for Jira | Atlassian Marketplace', '#rcnt');
});

...

After running the tests and generating the JUnit XML report (e.g., output/result.xml), it can be imported to Xray (by using either by the REST API or through the Import Execution Results action within the Test Execution).

...