From db62bd53310369c43bce01ee23a4efd29295141b Mon Sep 17 00:00:00 2001 From: agracio Date: Tue, 24 Dec 2024 23:07:07 +0000 Subject: [PATCH] adding junit xslt and tests --- src/junit-junit.xslt | 132 ++++++++++++++++++ src/junit.js | 2 +- tests/common.js | 1 + tests/converter.junit.test.js | 8 +- tests/data/result/junit-jenkins-junit.xml | 55 ++++++++ .../result/junit-jenkins-mochawesome.json | 22 +-- tests/data/result/junit-mocha-xunit-junit.xml | 70 ++++++++++ .../result/junit-mocha-xunit-mochawesome.json | 90 ++++++------ .../data/result/junit-notestsuites-junit.xml | 55 ++++++++ .../junit-testsuites-noattributes-junit.xml | 55 ++++++++ 10 files changed, 429 insertions(+), 61 deletions(-) create mode 100644 src/junit-junit.xslt create mode 100644 tests/data/result/junit-jenkins-junit.xml create mode 100644 tests/data/result/junit-mocha-xunit-junit.xml create mode 100644 tests/data/result/junit-notestsuites-junit.xml create mode 100644 tests/data/result/junit-testsuites-noattributes-junit.xml diff --git a/src/junit-junit.xslt b/src/junit-junit.xslt new file mode 100644 index 0000000..b54d397 --- /dev/null +++ b/src/junit-junit.xslt @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/junit.js b/src/junit.js index b7f14c1..5a5e3ab 100644 --- a/src/junit.js +++ b/src/junit.js @@ -151,7 +151,7 @@ function getError(testcase){ message = `${prefix}${fail.message.replaceAll(' ', '').replaceAll(' ', '')}`; } if(fail.$t){ - estack = fail.$t.replaceAll(' ', '\n'); + estack = fail.$t.replaceAll(' ', '\n').replaceAll(''', '\'').replaceAll('<', '<').replaceAll('>', '>').replaceAll('"', '\"'); } else if(typeof fail === 'string'){ estack = fail; diff --git a/tests/common.js b/tests/common.js index eea4e1d..313e0f3 100644 --- a/tests/common.js +++ b/tests/common.js @@ -25,6 +25,7 @@ function createOptions(file, type){ reportDir: outDir, reportFilename:`${path.parse(file).name}-mochawesome.json`, junit: true, + transformJunit: true, junitReportFilename: `${path.parse(file).name}-junit.xml`, } } diff --git a/tests/converter.junit.test.js b/tests/converter.junit.test.js index 2fa98aa..f4a2f10 100644 --- a/tests/converter.junit.test.js +++ b/tests/converter.junit.test.js @@ -10,28 +10,28 @@ describe("JUnit converter tests", () => { let options = common.createOptions('junit-jenkins.xml', 'junit'); await converter(options); - common.compare(options); + common.compare(options, undefined, true); }); test('junit-notestsuites.xml', async() => { let options = common.createOptions('junit-notestsuites.xml', 'junit'); await converter(options); - common.compare(options, 'junit-jenkins-mochawesome.json'); + common.compare(options, 'junit-jenkins-mochawesome.json', true); }); test('junit-testsuites-noattributes.xml', async() => { let options = common.createOptions('junit-testsuites-noattributes.xml', 'junit'); await converter(options); - common.compare(options, 'junit-jenkins-mochawesome.json'); + common.compare(options, 'junit-jenkins-mochawesome.json', true); }); test('junit-mocha-xunit.xml', async() => { let options = common.createOptions('junit-mocha-xunit.xml', 'junit') await converter(options); - common.compare(options); + common.compare(options, undefined, true); }); }); \ No newline at end of file diff --git a/tests/data/result/junit-jenkins-junit.xml b/tests/data/result/junit-jenkins-junit.xml new file mode 100644 index 0000000..9ba35a9 --- /dev/null +++ b/tests/data/result/junit-jenkins-junit.xml @@ -0,0 +1,55 @@ + + + + + @scenario.begin + + @tc:62 + Scenario: Create patient + When I create a patient with name "John Doe" on the host ... passed in 0.005s + Then the patient "John Doe" should also be created in the application. ... passed in 0.011s + +@scenario.end +-------------------------------------------------------------------------------- + + + + + @scenario.begin + + @tc:63 + Scenario: Close patient + Given a patient is opened in the application ... passed in 0.005s + When I close the patient on the host ... passed in 0.005s + Then the patient should also be closed in the application. ... passed in 0.005s + +@scenario.end +-------------------------------------------------------------------------------- + + + + + @scenario.begin + Scenario: Edit patient + Given a patient is opened in the application ... passed in 0.005s + When I change the patient name to "John Doe" on the host ... failed in 0.001s + Then the patient name should also be changed to "John Doe" in the application. ... skipped in 0.000s + +@scenario.end +-------------------------------------------------------------------------------- + + + Failing step: When I change the patient name to "John Doe" on the host ... failed in 0.001s +Location: tests/features/PatientRegistration.feature:20 +Traceback (most recent call last): + File "D:\dev\bdd_demo_behave\.venv\lib\site-packages\behave\model.py", line 1329, in run + match.run(runner.context) + File "D:\dev\bdd_demo_behave\.venv\lib\site-packages\behave\matchers.py", line 98, in run + self.func(context, *args, **kwargs) + File "tests\features\steps\step_patient_registration.py", line 33, in step_impl + context.patient.edit(first_name="John", last_name="Doe") +TypeError: edit() missing 2 required positional arguments: 'birth_date' and 'sex' + + + + \ No newline at end of file diff --git a/tests/data/result/junit-jenkins-mochawesome.json b/tests/data/result/junit-jenkins-mochawesome.json index f46d8c2..78c3998 100644 --- a/tests/data/result/junit-jenkins-mochawesome.json +++ b/tests/data/result/junit-jenkins-mochawesome.json @@ -16,7 +16,7 @@ }, "results": [ { - "uuid": "f0a8889a-a3a3-44ca-a98b-c56b44a2820c", + "uuid": "1dbbbd17-6bb3-4278-ad3b-85c4a03b5da7", "title": "", "fullFile": "", "file": "", @@ -25,7 +25,7 @@ "tests": [], "suites": [ { - "uuid": "4e9d6c4e-e0d0-4edf-8641-e659b8521ea3", + "uuid": "9926b91e-7b47-47b3-a6cd-68fc2abe2336", "title": "PatientRegistration.Patient Registration (Example)", "file": "", "beforeHooks": [], @@ -43,8 +43,8 @@ "context": "[{\"title\":\"system-out\",\"value\":\"@scenario.begin\\n\\n @tc:62\\n Scenario: Create patient\\n When I create a patient with name \\\"John Doe\\\" on the host ... passed in 0.005s\\n Then the patient \\\"John Doe\\\" should also be created in the application. ... passed in 0.011s\\n\\n@scenario.end\\n--------------------------------------------------------------------------------\"}]", "code": null, "err": {}, - "uuid": "f1cfcfd4-7a47-4eb7-8980-100f94f85ce6", - "parentUUID": "4e9d6c4e-e0d0-4edf-8641-e659b8521ea3", + "uuid": "23bb7af8-30b9-436b-a989-89ebd5499127", + "parentUUID": "9926b91e-7b47-47b3-a6cd-68fc2abe2336", "isHook": false, "skipped": false }, @@ -60,8 +60,8 @@ "context": "[{\"title\":\"system-out\",\"value\":\"@scenario.begin\\n\\n @tc:63\\n Scenario: Close patient\\n Given a patient is opened in the application ... passed in 0.005s\\n When I close the patient on the host ... passed in 0.005s\\n Then the patient should also be closed in the application. ... passed in 0.005s\\n\\n@scenario.end\\n--------------------------------------------------------------------------------\"}]", "code": null, "err": {}, - "uuid": "b6496130-9548-44ff-b7de-954ed06af71d", - "parentUUID": "4e9d6c4e-e0d0-4edf-8641-e659b8521ea3", + "uuid": "cb94bbf1-0cab-4224-a6c2-0bfc9a6221e5", + "parentUUID": "9926b91e-7b47-47b3-a6cd-68fc2abe2336", "isHook": false, "skipped": false }, @@ -81,19 +81,19 @@ "estack": "Failing step: When I change the patient name to \"John Doe\" on the host ... failed in 0.001s\nLocation: tests/features/PatientRegistration.feature:20\nTraceback (most recent call last):\n File \"D:\\dev\\bdd_demo_behave\\.venv\\lib\\site-packages\\behave\\model.py\", line 1329, in run\n match.run(runner.context)\n File \"D:\\dev\\bdd_demo_behave\\.venv\\lib\\site-packages\\behave\\matchers.py\", line 98, in run\n self.func(context, *args, **kwargs)\n File \"tests\\features\\steps\\step_patient_registration.py\", line 33, in step_impl\n context.patient.edit(first_name=\"John\", last_name=\"Doe\")\nTypeError: edit() missing 2 required positional arguments: 'birth_date' and 'sex'", "diff": null }, - "uuid": "0571e92b-63e8-4b1d-a573-4af8b0c50365", - "parentUUID": "4e9d6c4e-e0d0-4edf-8641-e659b8521ea3", + "uuid": "324da1ab-10ac-4d66-b63f-a9333332c6c6", + "parentUUID": "9926b91e-7b47-47b3-a6cd-68fc2abe2336", "isHook": false, "skipped": false } ], "suites": [], "passes": [ - "f1cfcfd4-7a47-4eb7-8980-100f94f85ce6", - "b6496130-9548-44ff-b7de-954ed06af71d" + "23bb7af8-30b9-436b-a989-89ebd5499127", + "cb94bbf1-0cab-4224-a6c2-0bfc9a6221e5" ], "failures": [ - "0571e92b-63e8-4b1d-a573-4af8b0c50365" + "324da1ab-10ac-4d66-b63f-a9333332c6c6" ], "pending": [], "skipped": [], diff --git a/tests/data/result/junit-mocha-xunit-junit.xml b/tests/data/result/junit-mocha-xunit-junit.xml new file mode 100644 index 0000000..d475c3d --- /dev/null +++ b/tests/data/result/junit-mocha-xunit-junit.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + Could not load file or assembly &#x27;test, Culture=neutral, PublicKeyToken=null&#x27;. The system cannot find the file specified. +Error: Could not load file or assembly &#x27;test, Culture=neutral, PublicKeyToken=null&#x27;. The system cannot find the file specified. + at exports.func (lib\edge.js:174:17) + at Context.&#x3C;anonymous&#x3E; (test\101_edge_func.js:82:19) + at process.processImmediate (node:internal/timers:491:21) + + + + + The input did not match the regular expression /Could not load type &#x27;Edge.Tests.idontexist&#x27;/. Input: + +&#x22;System.IO.FileNotFoundException: Could not load file or assembly &#x27;test, Culture=neutral, PublicKeyToken=null&#x27;. The system cannot find the file specified.&#x22; + +AssertionError [ERR_ASSERTION]: The input did not match the regular expression /Could not load type &#x27;Edge.Tests.idontexist&#x27;/. Input: + +&#x22;System.IO.FileNotFoundException: Could not load file or assembly &#x27;test, Culture=neutral, PublicKeyToken=null&#x27;. The system cannot find the file specified.&#x22; + + at Context.&#x3C;anonymous&#x3E; (test\101_edge_func.js:90:10) + at process.processImmediate (node:internal/timers:491:21) + + + + + Could not load file or assembly &#x27;test, Culture=neutral, PublicKeyToken=null&#x27;. The system cannot find the file specified. +Error: Could not load file or assembly &#x27;test, Culture=neutral, PublicKeyToken=null&#x27;. The system cannot find the file specified. + at exports.func (lib\edge.js:174:17) + at Context.&#x3C;anonymous&#x3E; (test\101_edge_func.js:102:19) + at process.processImmediate (node:internal/timers:491:21) + + + + + The input did not match the regular expression /Unable to access the CLR method to wrap through reflection/. Input: + +&#x22;System.IO.FileNotFoundException: Could not load file or assembly &#x27;test, Culture=neutral, PublicKeyToken=null&#x27;. The system cannot find the file specified.&#x22; + +AssertionError [ERR_ASSERTION]: The input did not match the regular expression /Unable to access the CLR method to wrap through reflection/. Input: + +&#x22;System.IO.FileNotFoundException: Could not load file or assembly &#x27;test, Culture=neutral, PublicKeyToken=null&#x27;. The system cannot find the file specified.&#x22; + + at Context.&#x3C;anonymous&#x3E; (test\101_edge_func.js:111:10) + at process.processImmediate (node:internal/timers:491:21) + + + + + + + + + + + the string &#x22;new exception&#x22; was thrown, throw an Error :) +Error: the string &#x22;new exception&#x22; was thrown, throw an Error :) + at process.processImmediate (node:internal/timers:491:21) + + + + \ No newline at end of file diff --git a/tests/data/result/junit-mocha-xunit-mochawesome.json b/tests/data/result/junit-mocha-xunit-mochawesome.json index 8381166..d8ec445 100644 --- a/tests/data/result/junit-mocha-xunit-mochawesome.json +++ b/tests/data/result/junit-mocha-xunit-mochawesome.json @@ -12,11 +12,11 @@ "hasOther": false, "skipped": 0, "hasSkipped": false, - "duration": 52 + "duration": 56 }, "results": [ { - "uuid": "be68b541-a35c-41d6-91a6-b53f0cb81e3d", + "uuid": "ad7f0a62-145b-4ca3-b934-bf0c82e971a5", "title": "", "fullFile": "", "file": "", @@ -25,7 +25,7 @@ "tests": [], "suites": [ { - "uuid": "8e7a483c-32b9-4b27-a315-c7e87e7aed27", + "uuid": "a570a02a-f02b-497b-8cfa-b7f4e340aa3e", "title": "Mocha Tests", "file": "", "beforeHooks": [], @@ -43,8 +43,8 @@ "context": null, "code": null, "err": {}, - "uuid": "79afd662-a489-43cc-b3c1-9163a01525c7", - "parentUUID": "8e7a483c-32b9-4b27-a315-c7e87e7aed27", + "uuid": "70d168b2-66fd-438c-884d-7bc746faab86", + "parentUUID": "a570a02a-f02b-497b-8cfa-b7f4e340aa3e", "isHook": false, "skipped": false }, @@ -60,8 +60,8 @@ "context": null, "code": null, "err": {}, - "uuid": "def6c43f-24ba-4722-b1e3-6c6840ab0e56", - "parentUUID": "8e7a483c-32b9-4b27-a315-c7e87e7aed27", + "uuid": "a36e1ad4-1e79-4c38-a4d4-2f2632a204dd", + "parentUUID": "a570a02a-f02b-497b-8cfa-b7f4e340aa3e", "isHook": false, "skipped": false }, @@ -77,8 +77,8 @@ "context": null, "code": null, "err": {}, - "uuid": "1336b878-dd16-44da-a708-080949593170", - "parentUUID": "8e7a483c-32b9-4b27-a315-c7e87e7aed27", + "uuid": "5a9ba613-1bb0-4c7b-bf2a-4c5be1f198db", + "parentUUID": "a570a02a-f02b-497b-8cfa-b7f4e340aa3e", "isHook": false, "skipped": false }, @@ -97,8 +97,8 @@ "estack": "Could not load file or assembly 'test, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.\nError: Could not load file or assembly 'test, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.\n at exports.func (lib\\edge.js:174:17)\n at Context. (test\\101_edge_func.js:82:19)\n at process.processImmediate (node:internal/timers:491:21)", "diff": null }, - "uuid": "75bb22bd-7210-4b8e-9e3c-1d77036c0387", - "parentUUID": "8e7a483c-32b9-4b27-a315-c7e87e7aed27", + "uuid": "6e6ca132-fa37-481d-997c-36f2c84b202a", + "parentUUID": "a570a02a-f02b-497b-8cfa-b7f4e340aa3e", "isHook": false, "skipped": false }, @@ -117,8 +117,8 @@ "estack": "The input did not match the regular expression /Could not load type 'Edge.Tests.idontexist'/. Input:\n\n\"System.IO.FileNotFoundException: Could not load file or assembly 'test, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.\"\n\nAssertionError [ERR_ASSERTION]: The input did not match the regular expression /Could not load type 'Edge.Tests.idontexist'/. Input:\n\n\"System.IO.FileNotFoundException: Could not load file or assembly 'test, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.\"\n\n at Context. (test\\101_edge_func.js:90:10)\n at process.processImmediate (node:internal/timers:491:21)", "diff": null }, - "uuid": "ed3e3c76-108d-490c-9dd7-ec5d19bdbe4d", - "parentUUID": "8e7a483c-32b9-4b27-a315-c7e87e7aed27", + "uuid": "9eaadaf8-1abb-448a-a8c2-1c7b3f205981", + "parentUUID": "a570a02a-f02b-497b-8cfa-b7f4e340aa3e", "isHook": false, "skipped": false }, @@ -137,8 +137,8 @@ "estack": "Could not load file or assembly 'test, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.\nError: Could not load file or assembly 'test, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.\n at exports.func (lib\\edge.js:174:17)\n at Context. (test\\101_edge_func.js:102:19)\n at process.processImmediate (node:internal/timers:491:21)", "diff": null }, - "uuid": "d701d98d-527a-4532-916d-383e2599ab3d", - "parentUUID": "8e7a483c-32b9-4b27-a315-c7e87e7aed27", + "uuid": "1d1cf12b-7559-46c9-a9e6-b2db99ab5f2c", + "parentUUID": "a570a02a-f02b-497b-8cfa-b7f4e340aa3e", "isHook": false, "skipped": false }, @@ -157,8 +157,8 @@ "estack": "The input did not match the regular expression /Unable to access the CLR method to wrap through reflection/. Input:\n\n\"System.IO.FileNotFoundException: Could not load file or assembly 'test, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.\"\n\nAssertionError [ERR_ASSERTION]: The input did not match the regular expression /Unable to access the CLR method to wrap through reflection/. Input:\n\n\"System.IO.FileNotFoundException: Could not load file or assembly 'test, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.\"\n\n at Context. (test\\101_edge_func.js:111:10)\n at process.processImmediate (node:internal/timers:491:21)", "diff": null }, - "uuid": "dadc65ab-b4c8-47b7-8df8-13088cbb3d0f", - "parentUUID": "8e7a483c-32b9-4b27-a315-c7e87e7aed27", + "uuid": "3815cefc-0369-4880-bf31-af39522992fe", + "parentUUID": "a570a02a-f02b-497b-8cfa-b7f4e340aa3e", "isHook": false, "skipped": false }, @@ -174,8 +174,8 @@ "context": null, "code": null, "err": {}, - "uuid": "9aff7004-61ac-40e7-ba06-2bd477cbaf1b", - "parentUUID": "8e7a483c-32b9-4b27-a315-c7e87e7aed27", + "uuid": "579bd745-2678-459a-8fe1-a848ea195f3d", + "parentUUID": "a570a02a-f02b-497b-8cfa-b7f4e340aa3e", "isHook": false, "skipped": false }, @@ -191,8 +191,8 @@ "context": null, "code": null, "err": {}, - "uuid": "21e48aba-10ae-4ac2-a17d-3ace70fb2732", - "parentUUID": "8e7a483c-32b9-4b27-a315-c7e87e7aed27", + "uuid": "8730f0c3-dcbb-4daf-9c1b-5ffea1da5647", + "parentUUID": "a570a02a-f02b-497b-8cfa-b7f4e340aa3e", "isHook": false, "skipped": false }, @@ -208,8 +208,8 @@ "context": null, "code": null, "err": {}, - "uuid": "73304573-a6ec-4285-b13f-440d4b7fec1a", - "parentUUID": "8e7a483c-32b9-4b27-a315-c7e87e7aed27", + "uuid": "fb108e58-dad4-4b0f-826c-fce6068dc1d2", + "parentUUID": "a570a02a-f02b-497b-8cfa-b7f4e340aa3e", "isHook": false, "skipped": false }, @@ -225,8 +225,8 @@ "context": null, "code": null, "err": {}, - "uuid": "acaad556-acc3-4766-b0c3-6c37c3b77c65", - "parentUUID": "8e7a483c-32b9-4b27-a315-c7e87e7aed27", + "uuid": "72fb0545-1df4-4724-b37e-173e76ebc7ac", + "parentUUID": "a570a02a-f02b-497b-8cfa-b7f4e340aa3e", "isHook": false, "skipped": false }, @@ -242,8 +242,8 @@ "context": null, "code": null, "err": {}, - "uuid": "86726a83-d6a5-4586-864c-b6dc8f27b367", - "parentUUID": "8e7a483c-32b9-4b27-a315-c7e87e7aed27", + "uuid": "55ee1dcb-debe-4705-926b-d2a1c3ad71ab", + "parentUUID": "a570a02a-f02b-497b-8cfa-b7f4e340aa3e", "isHook": false, "skipped": false }, @@ -259,8 +259,8 @@ "context": null, "code": null, "err": {}, - "uuid": "b8a87435-f931-4aae-8db4-5c7253746da2", - "parentUUID": "8e7a483c-32b9-4b27-a315-c7e87e7aed27", + "uuid": "3387bb7e-90b8-4057-aec4-ee6af05e0a79", + "parentUUID": "a570a02a-f02b-497b-8cfa-b7f4e340aa3e", "isHook": false, "skipped": false }, @@ -279,32 +279,32 @@ "estack": "the string \"new exception\" was thrown, throw an Error :)\nError: the string \"new exception\" was thrown, throw an Error :)\n at process.processImmediate (node:internal/timers:491:21)", "diff": null }, - "uuid": "cb23cf26-2c6e-444b-99b6-6ba5117442c9", - "parentUUID": "8e7a483c-32b9-4b27-a315-c7e87e7aed27", + "uuid": "5575272c-cded-418d-96da-8b5f42e74221", + "parentUUID": "a570a02a-f02b-497b-8cfa-b7f4e340aa3e", "isHook": false, "skipped": false } ], "suites": [], "passes": [ - "79afd662-a489-43cc-b3c1-9163a01525c7", - "9aff7004-61ac-40e7-ba06-2bd477cbaf1b", - "21e48aba-10ae-4ac2-a17d-3ace70fb2732", - "73304573-a6ec-4285-b13f-440d4b7fec1a", - "acaad556-acc3-4766-b0c3-6c37c3b77c65", - "86726a83-d6a5-4586-864c-b6dc8f27b367", - "b8a87435-f931-4aae-8db4-5c7253746da2" + "70d168b2-66fd-438c-884d-7bc746faab86", + "579bd745-2678-459a-8fe1-a848ea195f3d", + "8730f0c3-dcbb-4daf-9c1b-5ffea1da5647", + "fb108e58-dad4-4b0f-826c-fce6068dc1d2", + "72fb0545-1df4-4724-b37e-173e76ebc7ac", + "55ee1dcb-debe-4705-926b-d2a1c3ad71ab", + "3387bb7e-90b8-4057-aec4-ee6af05e0a79" ], "failures": [ - "75bb22bd-7210-4b8e-9e3c-1d77036c0387", - "ed3e3c76-108d-490c-9dd7-ec5d19bdbe4d", - "d701d98d-527a-4532-916d-383e2599ab3d", - "dadc65ab-b4c8-47b7-8df8-13088cbb3d0f", - "cb23cf26-2c6e-444b-99b6-6ba5117442c9" + "6e6ca132-fa37-481d-997c-36f2c84b202a", + "9eaadaf8-1abb-448a-a8c2-1c7b3f205981", + "1d1cf12b-7559-46c9-a9e6-b2db99ab5f2c", + "3815cefc-0369-4880-bf31-af39522992fe", + "5575272c-cded-418d-96da-8b5f42e74221" ], "pending": [ - "def6c43f-24ba-4722-b1e3-6c6840ab0e56", - "1336b878-dd16-44da-a708-080949593170" + "a36e1ad4-1e79-4c38-a4d4-2f2632a204dd", + "5a9ba613-1bb0-4c7b-bf2a-4c5be1f198db" ], "skipped": [], "duration": 56, diff --git a/tests/data/result/junit-notestsuites-junit.xml b/tests/data/result/junit-notestsuites-junit.xml new file mode 100644 index 0000000..ae22e17 --- /dev/null +++ b/tests/data/result/junit-notestsuites-junit.xml @@ -0,0 +1,55 @@ + + + + + @scenario.begin + + @tc:62 + Scenario: Create patient + When I create a patient with name "John Doe" on the host ... passed in 0.005s + Then the patient "John Doe" should also be created in the application. ... passed in 0.011s + +@scenario.end +-------------------------------------------------------------------------------- + + + + + @scenario.begin + + @tc:63 + Scenario: Close patient + Given a patient is opened in the application ... passed in 0.005s + When I close the patient on the host ... passed in 0.005s + Then the patient should also be closed in the application. ... passed in 0.005s + +@scenario.end +-------------------------------------------------------------------------------- + + + + + @scenario.begin + Scenario: Edit patient + Given a patient is opened in the application ... passed in 0.005s + When I change the patient name to "John Doe" on the host ... failed in 0.001s + Then the patient name should also be changed to "John Doe" in the application. ... skipped in 0.000s + +@scenario.end +-------------------------------------------------------------------------------- + + + Failing step: When I change the patient name to "John Doe" on the host ... failed in 0.001s +Location: tests/features/PatientRegistration.feature:20 +Traceback (most recent call last): + File "D:\dev\bdd_demo_behave\.venv\lib\site-packages\behave\model.py", line 1329, in run + match.run(runner.context) + File "D:\dev\bdd_demo_behave\.venv\lib\site-packages\behave\matchers.py", line 98, in run + self.func(context, *args, **kwargs) + File "tests\features\steps\step_patient_registration.py", line 33, in step_impl + context.patient.edit(first_name="John", last_name="Doe") +TypeError: edit() missing 2 required positional arguments: 'birth_date' and 'sex' + + + + \ No newline at end of file diff --git a/tests/data/result/junit-testsuites-noattributes-junit.xml b/tests/data/result/junit-testsuites-noattributes-junit.xml new file mode 100644 index 0000000..0eb53b1 --- /dev/null +++ b/tests/data/result/junit-testsuites-noattributes-junit.xml @@ -0,0 +1,55 @@ + + + + + @scenario.begin + + @tc:62 + Scenario: Create patient + When I create a patient with name "John Doe" on the host ... passed in 0.005s + Then the patient "John Doe" should also be created in the application. ... passed in 0.011s + +@scenario.end +-------------------------------------------------------------------------------- + + + + + @scenario.begin + + @tc:63 + Scenario: Close patient + Given a patient is opened in the application ... passed in 0.005s + When I close the patient on the host ... passed in 0.005s + Then the patient should also be closed in the application. ... passed in 0.005s + +@scenario.end +-------------------------------------------------------------------------------- + + + + + @scenario.begin + Scenario: Edit patient + Given a patient is opened in the application ... passed in 0.005s + When I change the patient name to "John Doe" on the host ... failed in 0.001s + Then the patient name should also be changed to "John Doe" in the application. ... skipped in 0.000s + +@scenario.end +-------------------------------------------------------------------------------- + + + Failing step: When I change the patient name to "John Doe" on the host ... failed in 0.001s +Location: tests/features/PatientRegistration.feature:20 +Traceback (most recent call last): + File "D:\dev\bdd_demo_behave\.venv\lib\site-packages\behave\model.py", line 1329, in run + match.run(runner.context) + File "D:\dev\bdd_demo_behave\.venv\lib\site-packages\behave\matchers.py", line 98, in run + self.func(context, *args, **kwargs) + File "tests\features\steps\step_patient_registration.py", line 33, in step_impl + context.patient.edit(first_name="John", last_name="Doe") +TypeError: edit() missing 2 required positional arguments: 'birth_date' and 'sex' + + + + \ No newline at end of file