I am using ReSharper Continuous Testing and want to write some code (c#) that can run a custom scenario when a test is being run by the r# Continuous Testing engine. ie not being run explcitly by the user
Unfortunately, there is no such possibility now. Continuous Testing test runner process and test runner process started manually are identical.
Related
I would like to perform automated unit tests on my web-api project after publish it on IIS but I don't know how ? I can launch tests in Visual Studio, no problem for that.
I have some unit tests in a different project, must I generate the unit tests project an deploy it in the api-web site, and use another soft to perform tests ?
Thanks for your response.
Firstly, what you are proposing here does not sound like Unit tests. They are integration tests that test the entire integration and end to end working across application layers.
Regarding the automated execution, you can easily set that up using CI/CD. You can use VSTS or TeamCity like solutions to run your test cases at a particular schedule. Or, you can run your tests using command line from a system, that has Visual Studio installed.
I want to perform automated test with Selenium,Nunit,TFS and MTM.
As i'm trying to find a way to run my selenium code using Nunit with MTM, i've searched alot regarding this but didn't find required solution as most of the people gave solution using MStest not with nunit after this i want to see my test case result on MTM.
Answer will be highly appreciated.
Based on my experience (lots of trial and error), you can only Associate Automation with an MSTest Test Method, to test cases in MTM.
A solution I've used with Selenium, NUnit and TFS is to use the VNext builds to run my tests, and use the build status to track the test results (including widgets on the dashboard).
I'm trying to figure out how to make it work. The documentation is slim to say the least on this important topic.
The small amount of tutorials I found make reference to options not even present when I open the tool. I don't see the Unit Test Runner, just the Integration Test runner. (version 5.3.1f1)
How to add a test? How to run it?
Integration Test runner allows you to add a test, but I was unable to find how to write the actual test.
It's sad that there's almost no documentation on this anywhere, or at least I haven't found it.
The Unity Test Tools are already included in Unity starting with Version 5.3. Even without downloading the Unity Test Tools from the Asset Store you should be able to find the "Editor Test Runner" in the Window menu. This is basically the Unit Test runner. For other features such as Assertions, Integration tests etc. you still need the Unity Test Tools bundle from the Asset Store.
The test tools use NUnit internally, so you can write tests using the standard NUnit API as described here http://www.nunit.org/index.php?p=quickStart&r=2.6.3.
There is also a Unity tutorial video here: https://unity3d.com/learn/tutorials/modules/beginner/live-training-archive/test-tools.
Make sure to put your Tests into an Editor folder.
Also note that some features like Assertions are not supported for Windows Store Apps and you won't even be able to build for this platform as long as you have those libraries in your project.
I need to run all the test methods once at a time automatically.
I have separate test methods written in separate files.
Is there any way to run all the test methods at a time automatically.
Please suggest if any.
Continuous Tests: http://continuoustests.com/ is a free automated test runner that supports the .NET and Mono platforms. I don't think it has a command line version.
Gallio http://www.gallio.org/ has a command line runner and a GUI runner (Icarus). I use it but I am not sure if it will do automated or continuous test runs
NCrunch http://www.ncrunch.net/ is also an automated test runner that works in Visual Studio. It used to be free but is now payware.
IF you are using NUnit you can use the NUnit GUI. Another option that is mostly framework agnostic is TestDriven.Net.
In my current project we are using a TFS Build server for continuous integration (build + run unit tests). We also have a set of automated acceptance tests written as SpecFlow features.
However, these are not integrated into the continuous integration workflow. Today, the application is deployed manually and the acceptance tests are invoked manually.
We would like to automate this in the form of a script/console application or some kind of existing CI tool.
This is what we would like to do periodically, e.g. once every hour:
Ask TFS if there are any new builds
If yes: get the latest successful build from TFS
Deploy the application to our test machine
Execute the SpecFlow tests against the deployed build
Collect the result and present it on some form of web page
Are there any existing tools or frameworks for this? I have read about existing CI servers but they doesn't seem to fit my description. If not, any advice on how to achieve step 1, 2 and 5 programatically or by using command line tools?
In my humble opinion TFS is capable of doing everything that you listed without involving any additional tools. What you might need to do is to setup a Lab Environment and use specific Workflow build definition to achieve it. You need also Test controller and test agents.
The easiest way might be to setup Standard Lab environment which might act in this way -
Build - Deploy - Test workflow
Build got triggered, then got deployed into the lab environment (might be a bunch of either physical or VM machines with installed test agents on them and connected to the Test controller), after that all test are executed and the result is consolidated as a part of the build results.
Hope this helps a bit!
-Rado