Current: We have Hybrid test framework using C# and Nunit. At end of all test execution, it creates TestResult.xml
Planning to implement: which later to be pushed in Jira-Xray via API through c# code.
Challenging part: but the challenge is if I am waiting for whether TestResult.xml file is created or not , it always sends me false. TestResult.xml only gets creates when 100% of codes are executed. including [TearDown] attribute. Even if I use wait, Thread, Task to check whether TestResult.xml file is created or not the Nunit thinks, still some code is getting executed, so it won't create TestResult.xml unless all codes are executed.
I want to send TestResult.xml to Jira-XRAY and from the response get all the test case ID and send mail with the list.
Note: The test frame work has configure setting testResult.runsettings.
<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
<NUnit>
<TestOutputXml>C:\ProgramData</TestOutputXml>
</NUnit>
</RunSettings>
Somebody please help me to fix this.
- Is it possible to have the TestResult.xml create just after the test is exusted and keep updating with the ongoing test result.
- Is it possible to create the TestResult.xml before TearDown in Nunit. OR Any other suggestion
Note: I am able to push TestResult.xml via Postman to Jira-Xray API and works fine, but same thing I wanna use it via code and that can only be achived if TestResult.xml gets create before Nunit reaches to TearDown attribute.