mono command line unit testing - testing

I wrote a few nunit tests that I've run successfully in nunit on win7, and via MonoDevelop on my mac.
What I'd like to do now is run these tests non-stop (or until I kill it). I can't see any way to tell MonoDevelop to keep running over and over, so I'm trying to do this via the commandline.
Is there a way to run the MonoDevelop testing tool from the command line? I don't need reporting (my tests already report internally), just re-triggering every few minutes.
If there was a commandline tool, I could just wrap it in fabric or a shell script and just run it over and over...

Why don't you just use the normal nunit command line? It is contained with the standard Mono installation, available as nunit-console command.

Related

Is there a commandline testrunner for googletest executables that allows running only the fastest tests?

I am looking for a command line tool that will take googletest executables as an argument and then only runs the fastest tests from that executable. Which those are should be defineable by a given time threshold.
At the first run this tool should run all tests and on further runs it could use the runtimes from the first runs to determine which tests are too slow to be run.
The Visual Studio GoogleTest adapter has such a feature, but I need it as a command line tool, so I can implement a "runFastTests" CMake target that can be used in a fast test-driven development loop.
Thank you for your time.

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.

Run local Selenium Tests via Jenkins/Hudson

I would like to run local Selenium test script written in Java, via Jenkins/Hudson. Is it possible to run scripts from my local windows machine? So far I have written some simple Selenium tests in Java, which run perfectly if I execute them via Eclipse IDE. I would be thankful for an in-depth explanation.
Selenium test in Java: assuming them to be laid out as unit tests (junit or testng), second assumption is that project is governed by either ant or maven, so there is some test (or rather integration-test) target or phase being present and be running smoothly when invoked from IDE.
When such tests are launched, they hit to a running selenium server (remote-control) which in turn launch a browser and runs its magic. Here are options: selenium server might be running in background (and be always available), or it might be started right before that testing and shut down afterwards. The latter is a common case for maven: pre-integration-test phase is configured to launch selenium rc, (then integration-test phase runs the tests against it), post-integration-test shuts selenium rc down.
So up to this moment we might want to learn what targets (ant) or phases(goals) your IDE invokes when it launches your tests successfully (also, what variables it sets or what profiles it enables).
If you invoke the same command from cmd (like 'mvn clean integration-test') and it runs successfully (same as IDE), then just instruct jenkins to run the same goals/targets (I assume that jenkins is running on the same machine, at the same user session).
If cmd doesn't do the trick (and you've looked quite well into what IDE does for you when it launches your tests), then I'd asked for more details.
So, involved participants are: 0. ant/maven that run your junit tests 1. selenium rc that should be running in bg or launched by ant/maven first 2. browser (path to browser executable) 3. jenkins (which was assumed to be running in the same environment).
If any of the assumptions are false, please come up with more details of your setup.

Run Telerik Test Studio test on the simulator

I'm trying to add a step on my Jenkins server for testing my iOS app automatically. I know how to deploy the TestStudio app on the simulator but I have to:
run the Test Studio app on the simulator from the Terminal console
execute the test (still from terminal)
I think that using terminal commands is the best solution to integrate this operation in a Jenkins job,but if anybody comes up with a better idea I would be more than happy to hear that. Any idea how to perform these tasks?
Currently it is not possible to execute Test Studio for iOS tests from the command line.
Our next major version, due out in early 2013, includes an API automation framework. With that you can write coded unit tests that can be triggered from the command line and integrated with Jenkins.

Hudson CI: cannot test grails-app

I've tried in each and every way to test a grails-app using hudson. I've tried testing with maven, I've tried testing with the grails plugin and I've tried testing with a shell builder it seems that building via shell is the only thing that works..
Every time I get the same error:
org.hibernate.HibernateException:
contains is not valid without active
transaction
But If i go to a shell and type
grails test-app
everything runs fine.
Does anyone have any idea on what's going on?
I'm using CentOS with Java 1.6, no slaves, just a simple hudson deploy over Tomcat6.
I've tried both with maven and grails builder, both fail.
Edit: it seems that if I run both unit and integration tests on the same command (either with grails or with mvn) the integration tests fail always.
Hudson/Jenkins usually just use the command line for executing grails plugins (You should be able to confirm that from the build output). You could probably add a pre build step to dump the environment, so you can see if anything there (or in your own shell) cause it to be fundamentally different.
Otherwise try to log in as the hudson user and find the hudson workspace and repeat the process manually. That has been the easiest way to debug hard problems like this..
regards