xUnit XML result
Import test result only
POST /ds/test-executions/xunit
Parameters and request body
Param | Type | Required | Description |
---|---|---|---|
projectKey | string |
| Key of the project where test result will be imported. |
milestoneId | integer | Milestone id to link to Test execution. To retrieve Milestone id go to Milestone feature and click Copy Id. Check out Milestone Document. | |
testExecutionKey | string | Test execution key to import test report. | |
testPlanKeys | array[string] | Test plan key to import test report. If you specify the Test Plan, the Tests will be added automatically to the Test Plan if they're not part of it. | |
testEnvironments | array[string] | A string containing a list of test environments separated by ",". | |
fixVersions | array[string] | A string containing a list of fixVersions separated by “,”. | |
revision | string | Revision to link to Test execution. |
Request body will contain a XML file which is xUnit report that is going to be imported. Learn more about xUnit testing framework.
Example
curl -X 'POST' \
'https://api.agiletest.app/ds/test-executions/xunit?projectKey=ATP' \
-H 'accept: application/json' \
-H 'Authorization: JWT <token>' \
-H 'Content-Type: application/xml' \
--data-binary '@my-report.xml'
In that, <token> is the result from previous step Get Authenticated.
<?xml version="1.0" encoding="utf-8"?>
<TestRun id="4f02b751-ab1b-4a06-a2e9-492a88b6b79e" name="@192 2024-11-06 07:59:43" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
<Times creation="2024-11-06T07:59:43.5428790+07:00" queuing="2024-11-06T07:59:43.5428790+07:00" start="2024-11-06T07:59:43.1765620+07:00" finish="2024-11-06T07:59:43.5462920+07:00" />
<TestSettings name="default" id="cfe53fc7-117a-404f-b5c4-7f6fd0ee7f26">
<Deployment runDeploymentRoot="_192_2024-11-06_07_59_43" />
</TestSettings>
<Results>
<UnitTestResult executionId="a47bdfda-4765-4f8f-ae1a-350bbff5ce45" testId="17cac3d5-f2df-3bc0-d247-72b2cb4f8851" testName="ShoppingApp.Tests.DeliveryTests.Deliver_ShouldReturnCorrectMessage" computerName="192" duration="00:00:00.0000528" startTime="2024-11-06T07:59:43.4990090+07:00" endTime="2024-11-06T07:59:43.4990090+07:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Passed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" relativeResultsDirectory="a47bdfda-4765-4f8f-ae1a-350bbff5ce45" />
<UnitTestResult executionId="4fd14e38-14bb-4a3a-a711-9eab286dab2d" testId="988305ea-6232-a1a2-51e6-f339734f6c0f" testName="ShoppingApp.Tests.DeliveryTests.Delivery_Constructor_ShouldSetProperties" computerName="192" duration="00:00:00.0039937" startTime="2024-11-06T07:59:43.4872000+07:00" endTime="2024-11-06T07:59:43.4872000+07:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Passed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" relativeResultsDirectory="4fd14e38-14bb-4a3a-a711-9eab286dab2d" />
<UnitTestResult executionId="41c3a495-d73f-41ff-bbb6-cc5dd47da290" testId="f44a52f0-307e-5fc8-74c5-38b76a0c2a48" testName="ShoppingApp.Tests.ProductServiceTests.GetProductDetails_ShouldReturnProduct" computerName="192" duration="00:00:00.0040504" startTime="2024-11-06T07:59:43.4875650+07:00" endTime="2024-11-06T07:59:43.4875650+07:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Passed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" relativeResultsDirectory="41c3a495-d73f-41ff-bbb6-cc5dd47da290" />
<UnitTestResult executionId="bf89679c-5ebf-4144-bae6-85574273d542" testId="09c9ecda-30db-9fbf-059b-d66d4fdf52fd" testName="ShoppingApp.Tests.BillingTests.IsPaymentSuccessful_ShouldReturnExpectedResult(amountPaid: 150, totalAmount: 100, expectedResult: True)" computerName="192" duration="00:00:00.0000022" startTime="2024-11-06T07:59:43.4992160+07:00" endTime="2024-11-06T07:59:43.4992160+07:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Passed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" relativeResultsDirectory="bf89679c-5ebf-4144-bae6-85574273d542" />
<UnitTestResult executionId="d441b9b2-579d-4f80-aa29-3e5acf1b92c8" testId="2ec2788d-e88c-489d-ef63-c93ac562d963" testName="ShoppingApp.Tests.CartTests.IsEmpty_ShouldReturnTrueWhenCartIsEmpty" computerName="192" duration="00:00:00.0000936" startTime="2024-11-06T07:59:43.4990930+07:00" endTime="2024-11-06T07:59:43.4990930+07:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Passed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" relativeResultsDirectory="d441b9b2-579d-4f80-aa29-3e5acf1b92c8" />
<UnitTestResult executionId="2b3fed43-fda5-4927-80ba-0efce9248a16" testId="67fdfc9f-b9eb-af26-e542-7195ba529537" testName="ShoppingApp.Tests.AddressTests.Address_Constructor_ShouldSetProperties" computerName="192" duration="00:00:00.0029166" startTime="2024-11-06T07:59:43.4871830+07:00" endTime="2024-11-06T07:59:43.4871830+07:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Passed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" relativeResultsDirectory="2b3fed43-fda5-4927-80ba-0efce9248a16" />
<UnitTestResult executionId="1e03b737-faa5-44eb-9d7a-e1187987cf12" testId="cf789527-8290-5624-beb9-b6af743dbea6" testName="ShoppingApp.Tests.AddressTests.Address_Setters_ShouldUpdateProperties" computerName="192" duration="00:00:00.0000522" startTime="2024-11-06T07:59:43.4990740+07:00" endTime="2024-11-06T07:59:43.4990740+07:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Passed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" relativeResultsDirectory="1e03b737-faa5-44eb-9d7a-e1187987cf12" />
<UnitTestResult executionId="928f6fc7-3935-4de9-b3dd-8405083dcc67" testId="e5069db5-a338-630a-8dc7-3ab469ce0654" testName="ShoppingApp.Tests.DeliveryServiceTests.ProcessDelivery_ShouldReturnDeliveryMessage" computerName="192" duration="00:00:00.0029455" startTime="2024-11-06T07:59:43.4857790+07:00" endTime="2024-11-06T07:59:43.4857880+07:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Passed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" relativeResultsDirectory="928f6fc7-3935-4de9-b3dd-8405083dcc67" />
<UnitTestResult executionId="256d545b-1fab-4a69-84e0-da0681fed313" testId="435ffe14-fc50-1083-c8cb-9d72486cf722" testName="ShoppingApp.Tests.UnitTest1.Test1" computerName="192" duration="00:00:00.0000855" startTime="2024-11-06T07:59:43.4991780+07:00" endTime="2024-11-06T07:59:43.4991780+07:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Passed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" relativeResultsDirectory="256d545b-1fab-4a69-84e0-da0681fed313" />
<UnitTestResult executionId="13eaa5ef-7263-4203-982c-2301a5c23e06" testId="fbe4a11d-50ac-3fcd-12c1-55f10727ec22" testName="ShoppingApp.Tests.CartServiceTests.Checkout_ShouldClearTheCart" computerName="192" duration="00:00:00.0036802" startTime="2024-11-06T07:59:43.4875530+07:00" endTime="2024-11-06T07:59:43.4875530+07:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Passed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" relativeResultsDirectory="13eaa5ef-7263-4203-982c-2301a5c23e06" />
<UnitTestResult executionId="be7b2756-015b-4321-b87b-058ad0531878" testId="a87716aa-4ff6-6397-ff24-82aeb2cd225b" testName="ShoppingApp.Tests.CartTests.ClearCart_ShouldEmptyTheCart" computerName="192" duration="00:00:00.0001224" startTime="2024-11-06T07:59:43.4991390+07:00" endTime="2024-11-06T07:59:43.4991390+07:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Passed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" relativeResultsDirectory="be7b2756-015b-4321-b87b-058ad0531878" />
<UnitTestResult executionId="e5a71d75-0ff5-4b29-8eb9-b2d712ed575b" testId="518ce122-956a-31a4-456d-bca32973c0fd" testName="ShoppingApp.Tests.BillingTests.Billing_Constructor_ShouldSetProperties" computerName="192" duration="00:00:00.0040157" startTime="2024-11-06T07:59:43.4870770+07:00" endTime="2024-11-06T07:59:43.4870770+07:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Passed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" relativeResultsDirectory="e5a71d75-0ff5-4b29-8eb9-b2d712ed575b" />
<UnitTestResult executionId="2dc76cd9-d674-49c0-a165-983a8e2a45d4" testId="b11db9cf-0072-1def-234f-07abfb71d49c" testName="ShoppingApp.Tests.BillingTests.IsPaymentSuccessful_ShouldReturnExpectedResult(amountPaid: 50, totalAmount: 100, expectedResult: False)" computerName="192" duration="00:00:00.0010543" startTime="2024-11-06T07:59:43.4991900+07:00" endTime="2024-11-06T07:59:43.4991900+07:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Passed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" relativeResultsDirectory="2dc76cd9-d674-49c0-a165-983a8e2a45d4" />
<UnitTestResult executionId="6b7203c1-ce25-4aee-9815-60b038ca27c1" testId="8160ecc6-446e-19fd-aa2b-a406638c7311" testName="ShoppingApp.Tests.ProductTests.Product_Constructor_ShouldSetProperties" computerName="192" duration="00:00:00.0038954" startTime="2024-11-06T07:59:43.4875720+07:00" endTime="2024-11-06T07:59:43.4875720+07:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Passed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" relativeResultsDirectory="6b7203c1-ce25-4aee-9815-60b038ca27c1" />
<UnitTestResult executionId="b0df5604-6675-445f-946d-26a904475c9f" testId="c50a974a-98fe-6d22-030e-fa8d0b4ec993" testName="ShoppingApp.Tests.CartTests.AddItem_ShouldIncreaseCartItems" computerName="192" duration="00:00:00.0043654" startTime="2024-11-06T07:59:43.4875790+07:00" endTime="2024-11-06T07:59:43.4875790+07:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Passed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" relativeResultsDirectory="b0df5604-6675-445f-946d-26a904475c9f" />
<UnitTestResult executionId="f147afae-b8c7-4a5f-be0e-cec997c863ba" testId="caca77b3-25be-db09-1d08-3b5b08a5f9b8" testName="ShoppingApp.Tests.CartTests.GetTotalPrice_ShouldReturnSumOfProductPrices" computerName="192" duration="00:00:00.0001571" startTime="2024-11-06T07:59:43.4991100+07:00" endTime="2024-11-06T07:59:43.4991100+07:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Passed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" relativeResultsDirectory="f147afae-b8c7-4a5f-be0e-cec997c863ba" />
<UnitTestResult executionId="b859ffe8-ad25-435f-8941-aab321a02fba" testId="c1b97651-df02-cf2e-ed2c-d2c040d72c14" testName="ShoppingApp.Tests.BillingTests.IsPaymentSuccessful_ShouldReturnExpectedResult(amountPaid: 100, totalAmount: 100, expectedResult: True)" computerName="192" duration="00:00:00.0001162" startTime="2024-11-06T07:59:43.4992040+07:00" endTime="2024-11-06T07:59:43.4992040+07:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Passed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" relativeResultsDirectory="b859ffe8-ad25-435f-8941-aab321a02fba" />
</Results>
<TestDefinitions>
<UnitTest name="ShoppingApp.Tests.UnitTest1.Test1" storage="/users/thachnguyen/work/autotest/agile-test-sample-projects/xunit/shoppingapp.tests/bin/debug/net8.0/shoppingapp.tests.dll" id="435ffe14-fc50-1083-c8cb-9d72486cf722">
<Execution id="256d545b-1fab-4a69-84e0-da0681fed313" />
<TestMethod codeBase="/Users/thachnguyen/Work/autotest/agile-test-sample-projects/xunit/ShoppingApp.Tests/bin/Debug/net8.0/ShoppingApp.Tests.dll" adapterTypeName="executor://xunit/VsTestRunner2/netcoreapp" className="ShoppingApp.Tests.UnitTest1" name="Test1" />
</UnitTest>
<UnitTest name="ShoppingApp.Tests.ProductTests.Product_Constructor_ShouldSetProperties" storage="/users/thachnguyen/work/autotest/agile-test-sample-projects/xunit/shoppingapp.tests/bin/debug/net8.0/shoppingapp.tests.dll" id="8160ecc6-446e-19fd-aa2b-a406638c7311">
<Execution id="6b7203c1-ce25-4aee-9815-60b038ca27c1" />
<TestMethod codeBase="/Users/thachnguyen/Work/autotest/agile-test-sample-projects/xunit/ShoppingApp.Tests/bin/Debug/net8.0/ShoppingApp.Tests.dll" adapterTypeName="executor://xunit/VsTestRunner2/netcoreapp" className="ShoppingApp.Tests.ProductTests" name="Product_Constructor_ShouldSetProperties" />
</UnitTest>
<UnitTest name="ShoppingApp.Tests.BillingTests.IsPaymentSuccessful_ShouldReturnExpectedResult(amountPaid: 150, totalAmount: 100, expectedResult: True)" storage="/users/thachnguyen/work/autotest/agile-test-sample-projects/xunit/shoppingapp.tests/bin/debug/net8.0/shoppingapp.tests.dll" id="09c9ecda-30db-9fbf-059b-d66d4fdf52fd">
<Execution id="bf89679c-5ebf-4144-bae6-85574273d542" />
<TestMethod codeBase="/Users/thachnguyen/Work/autotest/agile-test-sample-projects/xunit/ShoppingApp.Tests/bin/Debug/net8.0/ShoppingApp.Tests.dll" adapterTypeName="executor://xunit/VsTestRunner2/netcoreapp" className="ShoppingApp.Tests.BillingTests" name="IsPaymentSuccessful_ShouldReturnExpectedResult" />
</UnitTest>
<UnitTest name="ShoppingApp.Tests.DeliveryTests.Deliver_ShouldReturnCorrectMessage" storage="/users/thachnguyen/work/autotest/agile-test-sample-projects/xunit/shoppingapp.tests/bin/debug/net8.0/shoppingapp.tests.dll" id="17cac3d5-f2df-3bc0-d247-72b2cb4f8851">
<Execution id="a47bdfda-4765-4f8f-ae1a-350bbff5ce45" />
<TestMethod codeBase="/Users/thachnguyen/Work/autotest/agile-test-sample-projects/xunit/ShoppingApp.Tests/bin/Debug/net8.0/ShoppingApp.Tests.dll" adapterTypeName="executor://xunit/VsTestRunner2/netcoreapp" className="ShoppingApp.Tests.DeliveryTests" name="Deliver_ShouldReturnCorrectMessage" />
</UnitTest>
<UnitTest name="ShoppingApp.Tests.AddressTests.Address_Constructor_ShouldSetProperties" storage="/users/thachnguyen/work/autotest/agile-test-sample-projects/xunit/shoppingapp.tests/bin/debug/net8.0/shoppingapp.tests.dll" id="67fdfc9f-b9eb-af26-e542-7195ba529537">
<Execution id="2b3fed43-fda5-4927-80ba-0efce9248a16" />
<TestMethod codeBase="/Users/thachnguyen/Work/autotest/agile-test-sample-projects/xunit/ShoppingApp.Tests/bin/Debug/net8.0/ShoppingApp.Tests.dll" adapterTypeName="executor://xunit/VsTestRunner2/netcoreapp" className="ShoppingApp.Tests.AddressTests" name="Address_Constructor_ShouldSetProperties" />
</UnitTest>
<UnitTest name="ShoppingApp.Tests.DeliveryTests.Delivery_Constructor_ShouldSetProperties" storage="/users/thachnguyen/work/autotest/agile-test-sample-projects/xunit/shoppingapp.tests/bin/debug/net8.0/shoppingapp.tests.dll" id="988305ea-6232-a1a2-51e6-f339734f6c0f">
<Execution id="4fd14e38-14bb-4a3a-a711-9eab286dab2d" />
<TestMethod codeBase="/Users/thachnguyen/Work/autotest/agile-test-sample-projects/xunit/ShoppingApp.Tests/bin/Debug/net8.0/ShoppingApp.Tests.dll" adapterTypeName="executor://xunit/VsTestRunner2/netcoreapp" className="ShoppingApp.Tests.DeliveryTests" name="Delivery_Constructor_ShouldSetProperties" />
</UnitTest>
<UnitTest name="ShoppingApp.Tests.CartTests.AddItem_ShouldIncreaseCartItems" storage="/users/thachnguyen/work/autotest/agile-test-sample-projects/xunit/shoppingapp.tests/bin/debug/net8.0/shoppingapp.tests.dll" id="c50a974a-98fe-6d22-030e-fa8d0b4ec993">
<Execution id="b0df5604-6675-445f-946d-26a904475c9f" />
<TestMethod codeBase="/Users/thachnguyen/Work/autotest/agile-test-sample-projects/xunit/ShoppingApp.Tests/bin/Debug/net8.0/ShoppingApp.Tests.dll" adapterTypeName="executor://xunit/VsTestRunner2/netcoreapp" className="ShoppingApp.Tests.CartTests" name="AddItem_ShouldIncreaseCartItems" />
</UnitTest>
<UnitTest name="ShoppingApp.Tests.CartTests.ClearCart_ShouldEmptyTheCart" storage="/users/thachnguyen/work/autotest/agile-test-sample-projects/xunit/shoppingapp.tests/bin/debug/net8.0/shoppingapp.tests.dll" id="a87716aa-4ff6-6397-ff24-82aeb2cd225b">
<Execution id="be7b2756-015b-4321-b87b-058ad0531878" />
<TestMethod codeBase="/Users/thachnguyen/Work/autotest/agile-test-sample-projects/xunit/ShoppingApp.Tests/bin/Debug/net8.0/ShoppingApp.Tests.dll" adapterTypeName="executor://xunit/VsTestRunner2/netcoreapp" className="ShoppingApp.Tests.CartTests" name="ClearCart_ShouldEmptyTheCart" />
</UnitTest>
<UnitTest name="ShoppingApp.Tests.BillingTests.Billing_Constructor_ShouldSetProperties" storage="/users/thachnguyen/work/autotest/agile-test-sample-projects/xunit/shoppingapp.tests/bin/debug/net8.0/shoppingapp.tests.dll" id="518ce122-956a-31a4-456d-bca32973c0fd">
<Execution id="e5a71d75-0ff5-4b29-8eb9-b2d712ed575b" />
<TestMethod codeBase="/Users/thachnguyen/Work/autotest/agile-test-sample-projects/xunit/ShoppingApp.Tests/bin/Debug/net8.0/ShoppingApp.Tests.dll" adapterTypeName="executor://xunit/VsTestRunner2/netcoreapp" className="ShoppingApp.Tests.BillingTests" name="Billing_Constructor_ShouldSetProperties" />
</UnitTest>
<UnitTest name="ShoppingApp.Tests.CartTests.GetTotalPrice_ShouldReturnSumOfProductPrices" storage="/users/thachnguyen/work/autotest/agile-test-sample-projects/xunit/shoppingapp.tests/bin/debug/net8.0/shoppingapp.tests.dll" id="caca77b3-25be-db09-1d08-3b5b08a5f9b8">
<Execution id="f147afae-b8c7-4a5f-be0e-cec997c863ba" />
<TestMethod codeBase="/Users/thachnguyen/Work/autotest/agile-test-sample-projects/xunit/ShoppingApp.Tests/bin/Debug/net8.0/ShoppingApp.Tests.dll" adapterTypeName="executor://xunit/VsTestRunner2/netcoreapp" className="ShoppingApp.Tests.CartTests" name="GetTotalPrice_ShouldReturnSumOfProductPrices" />
</UnitTest>
<UnitTest name="ShoppingApp.Tests.DeliveryServiceTests.ProcessDelivery_ShouldReturnDeliveryMessage" storage="/users/thachnguyen/work/autotest/agile-test-sample-projects/xunit/shoppingapp.tests/bin/debug/net8.0/shoppingapp.tests.dll" id="e5069db5-a338-630a-8dc7-3ab469ce0654">
<Execution id="928f6fc7-3935-4de9-b3dd-8405083dcc67" />
<TestMethod codeBase="/Users/thachnguyen/Work/autotest/agile-test-sample-projects/xunit/ShoppingApp.Tests/bin/Debug/net8.0/ShoppingApp.Tests.dll" adapterTypeName="executor://xunit/VsTestRunner2/netcoreapp" className="ShoppingApp.Tests.DeliveryServiceTests" name="ProcessDelivery_ShouldReturnDeliveryMessage" />
</UnitTest>
<UnitTest name="ShoppingApp.Tests.CartTests.IsEmpty_ShouldReturnTrueWhenCartIsEmpty" storage="/users/thachnguyen/work/autotest/agile-test-sample-projects/xunit/shoppingapp.tests/bin/debug/net8.0/shoppingapp.tests.dll" id="2ec2788d-e88c-489d-ef63-c93ac562d963">
<Execution id="d441b9b2-579d-4f80-aa29-3e5acf1b92c8" />
<TestMethod codeBase="/Users/thachnguyen/Work/autotest/agile-test-sample-projects/xunit/ShoppingApp.Tests/bin/Debug/net8.0/ShoppingApp.Tests.dll" adapterTypeName="executor://xunit/VsTestRunner2/netcoreapp" className="ShoppingApp.Tests.CartTests" name="IsEmpty_ShouldReturnTrueWhenCartIsEmpty" />
</UnitTest>
<UnitTest name="ShoppingApp.Tests.BillingTests.IsPaymentSuccessful_ShouldReturnExpectedResult(amountPaid: 100, totalAmount: 100, expectedResult: True)" storage="/users/thachnguyen/work/autotest/agile-test-sample-projects/xunit/shoppingapp.tests/bin/debug/net8.0/shoppingapp.tests.dll" id="c1b97651-df02-cf2e-ed2c-d2c040d72c14">
<Execution id="b859ffe8-ad25-435f-8941-aab321a02fba" />
<TestMethod codeBase="/Users/thachnguyen/Work/autotest/agile-test-sample-projects/xunit/ShoppingApp.Tests/bin/Debug/net8.0/ShoppingApp.Tests.dll" adapterTypeName="executor://xunit/VsTestRunner2/netcoreapp" className="ShoppingApp.Tests.BillingTests" name="IsPaymentSuccessful_ShouldReturnExpectedResult" />
</UnitTest>
<UnitTest name="ShoppingApp.Tests.BillingTests.IsPaymentSuccessful_ShouldReturnExpectedResult(amountPaid: 50, totalAmount: 100, expectedResult: False)" storage="/users/thachnguyen/work/autotest/agile-test-sample-projects/xunit/shoppingapp.tests/bin/debug/net8.0/shoppingapp.tests.dll" id="b11db9cf-0072-1def-234f-07abfb71d49c">
<Execution id="2dc76cd9-d674-49c0-a165-983a8e2a45d4" />
<TestMethod codeBase="/Users/thachnguyen/Work/autotest/agile-test-sample-projects/xunit/ShoppingApp.Tests/bin/Debug/net8.0/ShoppingApp.Tests.dll" adapterTypeName="executor://xunit/VsTestRunner2/netcoreapp" className="ShoppingApp.Tests.BillingTests" name="IsPaymentSuccessful_ShouldReturnExpectedResult" />
</UnitTest>
<UnitTest name="ShoppingApp.Tests.ProductServiceTests.GetProductDetails_ShouldReturnProduct" storage="/users/thachnguyen/work/autotest/agile-test-sample-projects/xunit/shoppingapp.tests/bin/debug/net8.0/shoppingapp.tests.dll" id="f44a52f0-307e-5fc8-74c5-38b76a0c2a48">
<Execution id="41c3a495-d73f-41ff-bbb6-cc5dd47da290" />
<TestMethod codeBase="/Users/thachnguyen/Work/autotest/agile-test-sample-projects/xunit/ShoppingApp.Tests/bin/Debug/net8.0/ShoppingApp.Tests.dll" adapterTypeName="executor://xunit/VsTestRunner2/netcoreapp" className="ShoppingApp.Tests.ProductServiceTests" name="GetProductDetails_ShouldReturnProduct" />
</UnitTest>
<UnitTest name="ShoppingApp.Tests.AddressTests.Address_Setters_ShouldUpdateProperties" storage="/users/thachnguyen/work/autotest/agile-test-sample-projects/xunit/shoppingapp.tests/bin/debug/net8.0/shoppingapp.tests.dll" id="cf789527-8290-5624-beb9-b6af743dbea6">
<Execution id="1e03b737-faa5-44eb-9d7a-e1187987cf12" />
<TestMethod codeBase="/Users/thachnguyen/Work/autotest/agile-test-sample-projects/xunit/ShoppingApp.Tests/bin/Debug/net8.0/ShoppingApp.Tests.dll" adapterTypeName="executor://xunit/VsTestRunner2/netcoreapp" className="ShoppingApp.Tests.AddressTests" name="Address_Setters_ShouldUpdateProperties" />
</UnitTest>
<UnitTest name="ShoppingApp.Tests.CartServiceTests.Checkout_ShouldClearTheCart" storage="/users/thachnguyen/work/autotest/agile-test-sample-projects/xunit/shoppingapp.tests/bin/debug/net8.0/shoppingapp.tests.dll" id="fbe4a11d-50ac-3fcd-12c1-55f10727ec22">
<Execution id="13eaa5ef-7263-4203-982c-2301a5c23e06" />
<TestMethod codeBase="/Users/thachnguyen/Work/autotest/agile-test-sample-projects/xunit/ShoppingApp.Tests/bin/Debug/net8.0/ShoppingApp.Tests.dll" adapterTypeName="executor://xunit/VsTestRunner2/netcoreapp" className="ShoppingApp.Tests.CartServiceTests" name="Checkout_ShouldClearTheCart" />
</UnitTest>
</TestDefinitions>
<TestEntries>
<TestEntry testId="17cac3d5-f2df-3bc0-d247-72b2cb4f8851" executionId="a47bdfda-4765-4f8f-ae1a-350bbff5ce45" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" />
<TestEntry testId="988305ea-6232-a1a2-51e6-f339734f6c0f" executionId="4fd14e38-14bb-4a3a-a711-9eab286dab2d" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" />
<TestEntry testId="f44a52f0-307e-5fc8-74c5-38b76a0c2a48" executionId="41c3a495-d73f-41ff-bbb6-cc5dd47da290" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" />
<TestEntry testId="09c9ecda-30db-9fbf-059b-d66d4fdf52fd" executionId="bf89679c-5ebf-4144-bae6-85574273d542" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" />
<TestEntry testId="2ec2788d-e88c-489d-ef63-c93ac562d963" executionId="d441b9b2-579d-4f80-aa29-3e5acf1b92c8" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" />
<TestEntry testId="67fdfc9f-b9eb-af26-e542-7195ba529537" executionId="2b3fed43-fda5-4927-80ba-0efce9248a16" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" />
<TestEntry testId="cf789527-8290-5624-beb9-b6af743dbea6" executionId="1e03b737-faa5-44eb-9d7a-e1187987cf12" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" />
<TestEntry testId="e5069db5-a338-630a-8dc7-3ab469ce0654" executionId="928f6fc7-3935-4de9-b3dd-8405083dcc67" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" />
<TestEntry testId="435ffe14-fc50-1083-c8cb-9d72486cf722" executionId="256d545b-1fab-4a69-84e0-da0681fed313" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" />
<TestEntry testId="fbe4a11d-50ac-3fcd-12c1-55f10727ec22" executionId="13eaa5ef-7263-4203-982c-2301a5c23e06" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" />
<TestEntry testId="a87716aa-4ff6-6397-ff24-82aeb2cd225b" executionId="be7b2756-015b-4321-b87b-058ad0531878" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" />
<TestEntry testId="518ce122-956a-31a4-456d-bca32973c0fd" executionId="e5a71d75-0ff5-4b29-8eb9-b2d712ed575b" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" />
<TestEntry testId="b11db9cf-0072-1def-234f-07abfb71d49c" executionId="2dc76cd9-d674-49c0-a165-983a8e2a45d4" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" />
<TestEntry testId="8160ecc6-446e-19fd-aa2b-a406638c7311" executionId="6b7203c1-ce25-4aee-9815-60b038ca27c1" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" />
<TestEntry testId="c50a974a-98fe-6d22-030e-fa8d0b4ec993" executionId="b0df5604-6675-445f-946d-26a904475c9f" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" />
<TestEntry testId="caca77b3-25be-db09-1d08-3b5b08a5f9b8" executionId="f147afae-b8c7-4a5f-be0e-cec997c863ba" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" />
<TestEntry testId="c1b97651-df02-cf2e-ed2c-d2c040d72c14" executionId="b859ffe8-ad25-435f-8941-aab321a02fba" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" />
</TestEntries>
<TestLists>
<TestList name="Results Not in a List" id="8c84fa94-04c1-424b-9868-57a2d4851a1d" />
<TestList name="All Loaded Results" id="19431567-8539-422a-85d7-44ee4e166bda" />
</TestLists>
<ResultSummary outcome="Completed">
<Counters total="17" executed="17" passed="17" failed="0" error="0" timeout="0" aborted="0" inconclusive="0" passedButRunAborted="0" notRunnable="0" notExecuted="0" disconnected="0" warning="0" completed="0" inProgress="0" pending="0" />
<Output>
<StdOut>[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.5.3.1+6b60a9e56a (64-bit .NET 8.0.6)
[xUnit.net 00:00:00.04] Discovering: ShoppingApp.Tests
[xUnit.net 00:00:00.06] Discovered: ShoppingApp.Tests
[xUnit.net 00:00:00.06] Starting: ShoppingApp.Tests
[xUnit.net 00:00:00.10] Finished: ShoppingApp.Tests
</StdOut>
</Output>
</ResultSummary>
</TestRun>
{
"id": "321016",
"key": "ATP-1856",
"url": "https://company.atlassian.net/browse/ATP-1856"
}
Import test result with new execution details
POST /ds/test-executions/xunit/multipart
Parameters and request body
This request does not require any parameters. Instead, you need to submit two separate files: one containing the test execution details and the other containing the imported test report.
Test Execution file structure
fields
object:summary
: Summary of Test execution issue that will be created.project.id
: Project id in which the Test execution will be created.issuetype.id
: The identifier specifying the type of issue to be created.
agileTestFields
object:milestoneId
: The identifier of the milestone that this test execution should be associated with.testPlanKeys
: An array of issue keys of Test plan that this test execution is related to.
Each of these fields serves a specific purpose in creating and organizing the test execution:
The
fields
object contains standard issue creation information like what project it belongs to and what type of issue it is.The
agileTestFields
object contains Agile Test-specific information for linking the execution to milestones and test plans.
For the report, it will be similar to Import test result only.
Example
curl -X 'POST' \
'https://api.agiletest.app/ds/test-executions/xunit/multipart' \
-H 'accept: application/json' \
-H 'Authorization: JWT <token>' \
-H 'Content-Type: multipart/form-data' \
-F 'results=@my-report.xml;type=application/xml' \
-F 'testExecution=@test-execution.json;type=application/json'
In that, <token> is the result from previous step Get authenticated.
Regarding the test result, we will reuse the previous example.
{
"fields": {
"summary": "Regression test",
"project": {
"id": "17110"
},
"issuetype": {
"id": "16396"
}
},
"agileTestFields": {
"milestoneId": 5555,
"testPlanKeys": ["ATP-364", "ATP-362"]
}
}
In this example, make sure all details provided are accurate and relevant; otherwise, the request will fail. For example, if the issuetype.id
you specify does not exist in the project with ID 17110
, the system will return an error with the corresponding error code 400 .
{
"id": "321348",
"key": "ATP-1859",
"url": "https://company.atlassian.net/browse/ATP-1859"
}
Should you need any assistance or further AgileTest inquiries, contact here!