How can I change a build step status in Team City? - teamcity-8.0

Is it a way to override the build status in TeamCity based on the result of a test?
We have the following setup:
Deploy application
Run a test that validates that the application installed correctly.
Run test batch1
Run test batch2
Our problem is that we did not find a good way to skip running the tests from step 3 and step 4 if the test that validates the version failed.
This is because, even if the test fails, the step status is still successful. Is there a way to override the step status?

Related

How to show test results in the console?

In a GitHub Actions CI server I'm running ./pharo pharo.image test --fail-on-failure --junit-xml-output my-package to run a test suite. The problem is that when a test fails I just can see a console message saying that "Tests do not pass!", but no details on which ones or what happened, and I cannot reproduce locally nor look at the XML. Is there a way to show the failing tests and their stack traces?
I'm running on Pharo 8

How would I run integration tests from vivet/googleApi?

I am trying to work out how I would integrate this shared library from GitHub into my code, since it is a shared class library, for starters I just want to run the integration tests, but I cannot work out how go get the test runner to run them.
I created a console application in my main project and a reference to the GoogleMapsApiTest in the console but I am not sure how to call the tests from there to run them.
GoogleAPIClassLibrary
I had to download the gui test runner and build it from GitHub. Link to project
now I can at least run the tests, I am still not sure how to use the library but that should help at least see how it is supposed to work.
I was able to run the unit tests by downloading the NUnit source code at the link in my post and then browsing to the output dll of the class project, to load the tests apparently the gui-test runner is no longer available for download, so hopefully that will help someone else out if they run into a need for running tests in NUnit.

Forcing Eclipse to run JUnit tests in the same order that Maven runs them

I’m using Maven 3.2.3, SureFire 2.17, JUnit 4.11 and Eclipse Juno on Mac 10.9.5. I notice that when I run my JUnit tests via the command line
mvn test -Dtest=MyTest
the individual tests within the file “MyTest.java” run in a different order than when I run them in Eclipse (by right clicking the class name and selecting “Run As -> JUnit Test”). How do I get Eclipse to run the tests in the same order in which they are run on the command line?
Thanks, - Dave
The order of JUnit test runs are not guaranteed by design, as is mentioned in the JUnit FAQ page.This is done to promote the concept of test Independence, this will make sure that the tests will test their cases clearly and independently, and also ease maintainability.
This means that when you are running the tests in Eclipse, the orders are not guaranteed and keep changing. It's explained in "Can I change JUnit execution order?" on how you can possibly fix the order, even though its not a good practice.

Run Test Suite in Play 1.2.4

I am unable to run JUnit test suites in 1.2.4 since the command play test-only is not available. Please respond to the same in case there can be a fix for it without upgrading to higher versions of Play.
You can run your tests using the command:
play test
More information can be found here: http://www.playframework.com/documentation/1.2.4/test
Run your app in test mode:
play test
Then open the following URL:
http://localhost:9000/#tests
You'll be able to all, or individual, test classes to run. Unfortunately there's no way to run an individual test.
IDE:
If you are using an ide like eclipse you can run your junit tests from within the ide.
Command Line:
There are also the following two options for the command line:
Option 1:
play test
This runs the app in test mode. You can then run all tests via a browser interface available at:
http://localhost:9000/#tests (or your custom port if you changed it)
Option 2:
play auto-test
Runs the tests automatically without opening the browser.
Try using testOnly as the command, instead of test-only.

How to set up a Hudson server to run cppunit tests

I'm having problems setting up my Hudson server to run cpp unit tests so I can output an .xml file. I tried searching the web for some more straight forward instructions on how to set this up but still don't understand how to. It sounds like I need to set up ant to run...but how??
I'm currently running Hudson ver 1.352.
Any suggestions will be greatly appreciated.
Kat
I'm assuming you have some existing tests implemented in CppUnit that you can run by themselves. You could get these running in your Hudson job by using Ant, but since I don't think there is a CppUnit task for Ant you'd have to do it with an exec task.
It might be just as easy to call a shell script from Hudson to run your tests; you should then be able to get it to display the test results by checking the "Display JUnit test results" post-build action in your Hudson job and specifying the path to your results XML file (it's been a while, but as I remember CppUnit tests are in the same XML format as JUnit).
Let me know if I'm making any wrong assumptions.