Can I Automate pester Tests in Azure test plans? - powershell

So I am new to Azure Test plans and created few test cases.
I wanted to link/associate my tests (written using pester) with the test cases in azure test plans.
I saw many tutorials but it's all about Visual studio and c# tests - how to associate automated tests in test plans.
and my requirement is :
associate my pester tests with azure test cases.
is it possible?

These are the limitations for each type of test are supported for Azure Assosiation:
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.
https://learn.microsoft.com/en-us/azure/devops/test/associate-automated-test-with-test-case?view=azure-devops#test-types

Related

Associating automated tests with test cases in azure devops using eclipse

Please tell me if it's possible to associate Azure DevOps test cases with JUnit automated tests from eclipse. If yes, is there any step by step document I can follow? Please help
As I know it's not supported scenario.
You can find the supported tests from this document:
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.
So we recommend using Visual Studio to associate the automated tests. And for now the Junit framework is not supported in such scenario.

How can I have robot framework test cases in Visual studio-Test Explorer

I want to link my manual test cases in Azure test plan to robot framework automation test cases( python based test case using selenium library).
Performed below steps :
Created a test project containing my robot framework automated tests.
Checked test project into an Azure DevOps repository.
Created a build pipeline for the project, ensuring that it contains the automated test.
When I executed build pipeline, it appears in Visual Studio - Solution explorer but not in Test Explorer.
enter image description here
My question is how can I get robot framework test cases to appear in VS - Test Explorer so that I can associate it to manual test cases in Azure test plan.
Can you please tell me the steps that I need to do in VS to get Test Scenarios.robot in Test Explorer ?

can't associate Nunit Test methods to test cases in visual studio

I have created SpecFlow unit tests, I need to associate my tests to MTM test cases from visual studio. I am using Nunit as a test provider instead of MsTest.
I can see my Nunit tests in test explorer, but while trying to associate unit tests to test cases, the list to choose tests from is empty.
1) Do my test provider should be only MsTest to do linkage.
2) During time of linkage, can I change my test provider to MsTest, do the association, and again change my test provider to NUnit.
It seems that what you want is not possible. A similar question has been asked on stackoverflow here and the only answer says its not possible.
Someone also asked on the MSDN forums and the response from there seems to be the same, that it is only possible with MSTest
I know this question is from a few years ago but this is finally available in Visual Studio 2017 15.7.1. You can now associate NUnit and xUnit unit tests from the Test Explorer in Visual Studio. Here is some additional information on this and running the tests from a build or release.
http://www.deliveron.com/blog/test-case-association-xunit-nunit-and-mstestv2-tests-available-visual-studio-2017-1571/

Execute opencover with nunit from .net code

I am trying to create a asp.net website which will be as an entry point for all the nunit and code coverage.
I am able to run nunit against unit tests from the website using nunit api.
Is it possible to execute opencover with nunit using opencover api?
If yes, it would be real great for some sample code.
OpenCover is a console app and is simple to launch from any build framework.
The OpenCover source code has code for a dedicated msbuild task that you could use as a starting point.

How to integrate NUnit tests into a TFS 2010 build

What is the best way to integrate nunit tests into TFS 2010? Is it via generic tests or is there a better approach to running them?
Ideally I'd like to have the granularity of one generic test per test assembly and have a way to surface the results in the TFS build report.
As of now (Oct 2011), the easiest way is probably via the NUnit activity that can be found in the Community TFS Build Extensions.
You can run nunit tests from command line and therefore you can automate these tests via your (Workflow) build template.
Since there aren't a lot of custom build activities available for TFS 2010 yet, you could write your own to make sure that it integrates better with the TFS Build Report.
Here you can find some information about writing a custom build activity.
Another approach would be to create unit tests via Visual Studio. These tests will be automatically run when performing a build.
Ian Battersby wrote a great tutorial how to set up NUnit tests for Visual Studio 2010.
Basically, you need to:
download his build workflow template and set to your build definition
install NUnit and NUnitTFS in your tfs machine
add paths to installed directories in build process parameters
set Configurations to Build setting in build process parameters
change your NUnitTfs.exe.config with your collection name