Test list - How to stop on failure

2 Answers 64 Views
Azure DevOps Test Configuration Test Execution VS Plugin
Daniel
Top achievements
Rank 3
Iron
Iron
Iron
Daniel asked on 10 Jan 2023, 02:15 PM

Hey guys,

currently we're trying to integrate our tests in azure devops pipeline. We want to achieve that the testlist we're running will stop on failure. How can we do that?

I've found the documentation here but it only describes the solution for the desktop application. Not if we want to achieve this behavior in Visual Studio or in Azure Devops pipeline.

Thanks and regards,

Daniel

2 Answers, 1 is accepted

Sort by
1
Accepted
Missing User
answered on 12 Jan 2023, 03:44 PM

Hi Daniel,

There is another option to stop the test list execution on test failure, but again it is applicable only per test. 

In order to achieve above for all your test you can extend the BaseWebAiiTest as described in this article. In the extended class you can override the method OnBeforeTestStarted(BeforeTestStartedArgs args) and set the property StopTestListOnFailure.

Hereafter you have to make sure all your existing code behind files (tstest.cs) inherit your extended class (ExtendedBaseWebAiiTest) instead of the BaseWebAiiTest.

   public class ExtendedBaseWebAiiTest : BaseWebAiiTest
    {
        public override void OnBeforeTestStarted(BeforeTestStartedArgs args)
        {
            args.Test.StopTestListOnFailure = false;
            base.OnBeforeTestStarted(args);
        }
    }

 

In order project to compile you have to do one more thing - add the following two references in the project Settings.aii file in the ProjectReferences array: 

"System.Runtime.Serialization",
"Telerik.TestStudio.Interfaces"

Should you have any additional questions, please let me know.

Regards,
Stoyan
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Test Studio course! Check it out at https://learn.telerik.com/.
Daniel
Top achievements
Rank 3
Iron
Iron
Iron
commented on 13 Jan 2023, 08:43 AM

Thank you very much for the idea, I'm already using such an extended base class so the implementation is pretty good in my case!
Missing User
commented on 13 Jan 2023, 03:21 PM

Hi Daniel,

I'm glad that we've found the solution that suits you the most.

0
Missing User
answered on 11 Jan 2023, 12:15 PM

Hello Daniel,

I'm sorry to hear you experience troubles with the setup of the Azure pipeline and will assist you with sorting this out.

From the description bellow, I'm assuming that you are using either Test Studio plugin or Testing Framework to run the tests in Visual Studio or Azure Devops.

If you are using Visual Studio plugin, you can edit the test settings and enable StopTestListOnFailure  property as described here.

If you are using Telerik Testing Framework, you can set  StopTestListOnFailure  property directly in the Test object, here you can find the API reference.

I hope the above suggestions will work for you. If you have any further questions don't hesitate to contact Test Studio Support team.

Regards,
Stoyan
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Test Studio course! Check it out at https://learn.telerik.com/.
Daniel
Top achievements
Rank 3
Iron
Iron
Iron
commented on 11 Jan 2023, 12:31 PM

Since we're developing our (coded) tests (.tstest.cs files) in Visual Studio, I assume we're using the Test Studio plugin. In Azure Devops we're triggering after deploying our code the "Progress\Test Studio\Bin\ArtOfTest.Runner.exe" to run our coded tests. If there is any other possible way to run our tests automated with continious integration, give us a notice.

The way to edit the test settings aren't our use case, we want to define inside a test list to stop triggering the other tests if one already failed.

 

Tags
Azure DevOps Test Configuration Test Execution VS Plugin
Asked by
Daniel
Top achievements
Rank 3
Iron
Iron
Iron
Answers by
Missing User
Share this question
or