using NUnit 2 and 3 in the same solution - msbuild

I have 2 test projects in my solution. One is using NUnit version 2 (integration + SpecsFor) and another version 3.(Unit tests)
Running locally this works fine but when I execute the tests as part of a build on TFS I get an error message even though all tests passes. I read here this occurring because VSTestAdapter2 cant run the v3 ones.
Is it not possible to run both version 2 and 3 in the TFS build?

The NUnit3TestAdapter compatible with NUnit 2, so you can install NUnit3TestAdapter package to your NUnit test projects.

Related

How to build RPM of a selenium test automation project with maven?

I have a test automation framework with test cases. I want to build an RPM of this whole project so that it can be installed on any machine and can execute the test. How can I do that?
One approach is to use a %check scriptlet in a spec file to run the tests during a build.

build and testing with TFS 2013 and Selenium

I'm looking help for Microsoft Team foundation server 2013 , in fact i want to integrate selenium script with auto build. when build is deployed my selenium script run automatically on new build,
I'm new to Team foundation server so i don't have much idea about integration selenium script , please explain in detail so that i can follow exact steps.
My script is placed at Team foundation server repository , do i need to compile my selenium script with auto-build or no need to compile
You just need to build the selenium project and then run the test with it.

Do we need to install JDK to run WebDriver's TestNG tests through command line?

I am new to Selenium/WebDriver and created a project which I can execute through Eclipse IDE successfully. Now, I plan to run the test through command prompt by creating the proper TestNG1.xml and making sure the testng-6.8.5.jar is correctly pointed in PATH. I even tried giving full path of the testng-6.8.5.jar. Unfortunately I keep getting the error,
Error: Could not find or load main class org.testng.TestNG
I don't have JDK installed (and I don't want to install) so wondering if JDK is mandatory to run TestNG tests from Command line? From above error it looks like it's not even trying to access the TestNG1.xml I have.
I plan to distribute these tests as group of files to my fellow Business Analyst who only have JRE installed on their machine.
Yes, you need JDK installed where you are going to run your Test Here is some documentation of TestNG
Having JRE is enough to run the TestNG tests, or no need to install JDK to run the TestNG tests through command line
the issue was with the testng-6.8.5.jar library as selenium-server-standalone-2.32.0.jar was allowing me to run the project with no errors.

Using MS Build to deploy after tests

I have a web project structured the following way:
WebSite
WebSite.test
In the test project, I have all the unit tests (using Microsoft test framework). In the WebSite project I have a target to deploy the site using MSDeploy, the MSDeployPublish target, and DeployOnBuild=true. I then run this build using Jenkins. The problem is that using this setup, the site will get deployed before it's tested.
I could add another build step in Jenkins, so that the entire solution is built first, then the deploy projects are run. However, I would like for it all to be in one step. Is this at all possible?
This is probably a bug in Jenkins. See this bug (or this one). See comments for possible workarounds.

Setting up Hudson with Selenium RC to run tests written in C#

I just deployed a Hudson server and configured it to checkout, build and deploy to a testing http server.
Now I want more =)
I have some Selenium RC tests wrtten in C#/.Net, using the MbUnit infrastructure, that runs ok on Gallio Icarus.
How to setup Hudson to run these tests? Our is in a Windows 2003 server.
I was thinking about just setting a batch script that runs the tests. But how to run them in CLI? Is there a CLI test runner that could run our tests?
Hah! Just found out.
I have to run:
Gallio\bin\Gallio.Echo.exe path\MyTestAssemlby.dll
When Google fails you, try searching your own PC =)
If you prefer NAnt, MSBuild or PowerShell you can use those too...