How to run selenium tests in Microsoft Test Manager

I have several automated tests written in nunit and selenium. How can I call a DLL to run from Microsoft Test Manager. since I could not figure out how to run automated tests from MTM. Is it possible.

+4
source share
3 answers

MTM does not run automated tests. This is a tool designed for hand testers. The only automation he offers is to record / repeat the actions that the tester recorded.

If you want to run Selenium tests automatically, look at running NUnit as part of the build process, just make sure that the build agent works as an interactive process, not a service, so that Selenium can access the desktop and launch the browser.

Alternatively, you can use a browser without a header, such as XBrowser or HTMLUnit (although you need to use the remote Selenium2 driver )

-eight
source

MTM allows you to automate the test. We can view the test case in Visual Studio and attach the executable file to the test script (created in MTM). Later, we must associate the assembly with the test plan, as well as to perform an automated test. The test code should be developed as a test project (CodedUI or Unit test), if this is not done so that the test manager does not find a method that should be tested.

+4
source

In order for MTM to run automated tests using Selenium, you need to associate the test with a test case in MTM. Currently MTM only supports MS tests, so you will need to create a wrapper for each selenium test.

Solution # 1: I would build a shell with a T4 template that would generate the necessary MS Test stubs that call my Selenium tests.

Then you will need a test case in TFS with the related "automation" MS automation.

Solution # 2: you can use the β€œtcm import” command line tool to create and store your test cases in synchronization with automation.

Now that you have all the bits configured, you can continue and call the generated tests from MTM, and you are in the problem that @richard mentioned.

Solution # 3: you can configure the environment in MTM, where you are going to collect data and automate the trigger of the test run. This can be done as part of the assembly or better as part of your binary conveyor system in release management ( http://nakedalm.com/execute-tests-release-management-visual-studio-2013/ )

While there are many hoops to get all the settings, I found it to be a pretty reliable way to do the automation. It would be much easier if MTM supported other test environments, but now it is not.

+3
source

Source: https://habr.com/ru/post/1395575/


All Articles