Hi all. My team is fairly new to using AIO. We already have a decent amount of automated test cases using NUnit as our test runner. My current task is to figure out how to get those test cases imported into AIO. I found the documentation regarding import test results files and after a simple test with a small amount of cases, I was able to get it to work. However, after the import was done I noticed that not all fields from my test results file were imported into AIO. For example, take this test from our repository:
[Test]
[Category(TestCategory.ManageAppApi)]
[Description("Verifies that a property with open violations that are updated to closed returns the correct counts for those items.")]
public void Properties_UpdateOpenViolationsToClosed_Test()
As you can see, it has both the NUnit Description and Category attributes. I did a test run including this test. I then imported it into AIO. The test case was created in AIO with the name "Properties_UpdateOpenViolationsToClosed_Test" which is perfect. However, I would also like Category and Description to be imported as well. As there is a Description field on AIO test cases, it would make the most sense for my Description from code to populate the AIO Description field. For category, I would love to be able to populate the tag field with whatever categories I have on a test case in my code. Is there any way to do with with the import endpoint?
Hello Bryan,
We had tried putting the Description like you had in our tests and generated the xml. The description still didn;t show up. Can you please let us know how are you generating the report file and the versions being used.
Regards,
Niharika
Thanks. I'm currently looking for the quickest way to get the data from these automated cases into AIO. I know that we can hit the API directly, but that's is something we may do in the future.
FYI, description does make it into the NUnit result file.
</test-case>
<test-case id="0-1155" name="Properties_UpdateOpenViolationsToClosed_Test" fullname="Automation.ManageApp.Test.API.Tests.ViolationPastCureDateTests.Properties_UpdateOpenViolationsToClosed_Test" methodname="Properties_UpdateOpenViolationsToClosed_Test" classname="Automation.ManageApp.Test.API.Tests.ViolationPastCureDateTests" runstate="Runnable" seed="1555472791" result="Passed" start-time="2025-03-20T18:47:18.3682548Z" end-time="2025-03-20T18:47:46.9637863Z" duration="28.595535" asserts="76">
<properties>
<property name="Category" value="ManageAppAPI" />
<property name="Description" value="Verifies that a property with open violations that are updated to closed returns the correct counts for those items." />
<property name="AllureContext" value="AllureContext { Containers = [Automation.ManageApp.Test.API.Tests.ViolationPastCureDateTests], Fixture = null, Test = null, Steps = [] }" />
</properties>
Hello Bryan,
The Description field in tests, do not make way into the NUnit Test results XML, which form the input to AIO. [ Ref : https://docs.nunit.org/articles/nunit/technical-notes/usage/Test-Result-XML-Format.html]
AIO APIs are always an option to make call from your code to update description from test frameworks. Another option can be to establish a new convention in property, say "AIO_Description:<desc goes here>" and since properties do make their way in the results file, AIO can parse it as description. This can work for new cases, but for existing cases, this may add extra work. We would like to hear your opinion on this approach or of any other suggestions as well.
However, for the category, they can definitely be tagged in AIO Tests. We will add a feature request for this and update this thread as this is gets released.
Regards,
Niharika