I need to somehow associate the automated tests with manual test plan in Azure. I already installed Visual Studio and open my automated test cases in VS. But when I am trying to click "Associate to Test Case" I got the error that functionality is applicable only with MSTest, XUNIT etc. And my framework Pytest is out of this list.
Does that mean I have no possibility to associate my automated test cases with manual one using this functionality? But maybe I can do it in other way? Maybe something can be done with yaml file? Or I can simply tagged automated test cases directly in Test Plan? Or maybe I can install third party plugin for pytest? Or maybe there is a way to build a matrix with manual/automated test cases?
I have no idea, but I need to have the visual picture of test cases matrix.
Does that mean I have no possibility to associate my automated test
cases with manual one using this functionality
Yes, we cannot associate framework Pytest to test case in Azure DevOps. It's not supported.
See What types of tests are supported? for details.
A: These are the limitations for each type of test:
Coded UI test, Selenium tests, and unit tests written using Version 1
of the MSTest framework can be associated with a test case.
Tests that use MSTest v2, NUnit, and xUnit frameworks can be associated with a test case workitem when using Visual Studio 15.9 Preview 2 or later. However, these tests cannot be run using Microsoft Test Manager and XAML builds.
Tests that use the .NET core framework can be associated with a test case workitem when using Visual Studio 15.9 Preview 2 or later. To run the .NET core tests the appropriate target framework must be specified in a runsettings file. However, these tests cannot be run using Microsoft Test Manager and XAML builds.
Tests that use other test frameworks such as Chutzpah (for JavaScript tests such as Mocha or QUnit), or Jest cannot be associated with a test case.
Associating generic tests may work, but running these tests is not supported.
However, you can reference the following blogs to run Python test with Azure DevOps pipeline:
Run Python test with Azure DevOps pipeline
Selenium Python Tests & Azure DevOps Integration – Made for each other!
Related
I have a generic Selenium Test which needs to run over all projects how would i do that with Visual Studio online? I can get it to work on one project at a test but not sure how to make it so this test can run on all projects?
Generally you need to write the specific Selenium test for the specific project. However if all the projects you mentioned have the same structure/components/features, then you can reuse the Selenium test project for them.
I don't think it's this is applicable if you mean create tests together which want to apply for all the different projects.
You can reference below articles about the Selenium Test in TFS:
Get started with Selenium testing in a CD pipeline
Parallel Testing in a Selenium Grid with VSTS
Now on my project we use TFS as TestCase management tool, issue tracking system and code management. But we want to move to JIRA and Bitbucket. In VisualStudio we have ability to bind TC to automation test and then run test suite with automation test. The question is: Is it possible to bind JIRA test case with automation test(UI tests, API tests used MSTest framework)? Is it possible to run automation test and see if test case pass\failed? Some reports?
Maybe there is possibility to develop some extension for this?
Unfortunately, right now there are no built-in JIRA importer for data from Microsoft Team Foundation Server for Visual Studio.
However, there are complete third party solutions available which might help you between JIRA and TFS such as below:
TFS4JIRA
MS TFS Connector for JIRA
UseTFS
We need to create load and stress tests for a cloud application. Most tests will have to be coded instead of being recorded. Thus we need to integrate unit tests in the text mix.
Currently, we are creating a spike with Visual Studio 2015 Load Test Framework. We want to run the load tests from our local infrastructure as well as use Azure's cloud testing.
We would rather use XUnit instead of MS Test to write the unit tests. Is that possible? Do we have to write an plugin to achieve that?
Please check this question for the answer. Both NUnit and XUnit tests can't be added to a load test.
We use TFS 2012
Through a build definition we execute automated tests from MTM test plans.
How can we ensure TFS uses vstest.console.exe to run each test?
I've read online from other posts that TFS 2012 let's you choose either MSTest or VSTest as the test runner.
I've also read that if you use MTM you effectively are locked into using a test settings file(.testsettings) which means you are locked into using MSTest. This seems to go against TFS 2012 giving you a choice.
Test Manager currently is only supporting MsTest. This is a limitation in Test Manager. It's the same issue that prevents you from associating a xUnit or NUnit test automation on a test case.
So while TFS 2012 gives you the choice, each choice comes with its own set of limitations.
To be clear:
New test runner: Work in Continuous Integration, you specify which tests to run by selecting the new agile test runner (in TFS 2013 this is a fixed choice in the default templates, template customization is required to run mstest). It can run tests during build and you can directly invoke it from the commandline if you want to run tests after deployment. You can use a .runsettings file to specify certain options it should pick up. This option is required to execute 3rd party test frameworks like NUnit, XUnit.NET, Chutzpah etc.
The MTM test runner: Execute automated tests that are associated to a Test Case work item or execute tests using the Test Agent to run tests from a remote system using the Team Test infrastructure. You can use a .testsettings file to specify certain options it should pick up. These tests will be executed using MsTest and cannot contain 3rd party test frameworks.
In your Continuous Integration build you can configure multiple Test Runs, each can be configured to a specific test framework. So you can have both options in your build.
More on the differences and how you can use the different settings files.
Over time all test options will be moved to the new test runner. In TFS 2013 the option to configure a MsTest based test run in your Build Definition has been removed by default. You will need to customize the build process to select a different test runner.
I have Nunit unit test which i need to run as the part of my MS build.. I know that running all the test will slow up the build So, i need to run only the impacted test is there any way to find that out..
AFAIK running only impacted tests is not possible yet for NUnit tests. But this is possible for MSTests in Visual Studio 2010 Ultimate/Test Professional:
Recommending Tests to Run That are Affected by Code Changes
You can use Visual Studio Ultimate or Visual Studio Test Professional
2010 to help you determine which tests might have to be run, based on
coding changes that were made to the application you are testing. To
be able to use this functionality, you have to use Team Foundation
Build to build your application and use Microsoft Visual Studio 2010
for version control for your source code
Anyway you can use MSBuild Community NUnit Task to run tests from a set of the assemblies. You can do this as dependency target of standard AfterBuild target by specifying DependsOnTargets attribute.
<NUnit Assemblies="..."
IncludeCategory="..."
ExcludeCategory="..."
ToolPath="$(NUnitDllsPath)"
ProjectConfiguration="$(Configuration)"
OutputXmlFile="$(NUnitOutputPath)\UnitTests.xml"
ContinueOnError="true">
To know the impacted tests you need to track the test case code coverage. Only this way you can examine what test is impacted by the changes you are checking in. I don't know of any tool that does what you want besides Microsofts Team Foundation Server.
Running your tests as a part of the build can be done trough the Build Events properties of your project. You can execute the command line tool for NUnit.
But as PVitt already pointed out, I don't know if NUnit can work with Test Impact analysis.