I've configured and am executing mocha tests in WebStorm, so I know the module is working properly. But I can't seem to make it run from a Bamboo task. The task runs with Success but there are 0 tests executed.
This is my configuration atm:
app/ is my working dir. Tried also with app/node_modules/mocha/bin/ and other possibilities. I am not sure which exactly is the Mocha executable of all the mocha named files in the module...
Or maybe the problem lies in the tests dir? I've got test files, respectively in app/test/unit/models/ and app/test/unit/services/. But in WebStorm I configured it with the general test dir - just /app/test. Configuring the Mocha task in Bamboo with the specific test folders did not yield result...
I believe the problem comes from wrong directory configurations in the task, but I've tried writing whatever paths already and I've got no idea what's missing or wrong...
I noticed from your screenshot that the "Parse test results produced by this task" box isn't checked. This is what tells Bamboo to parse the output of the tests that you run.
Related
I have a test automation project where basically I run cucumber test via gradle task. What's weird is that the build folder is generated on .daemon folder instead of the project directory. E.g.
/Users/my_user/.gradle/daemon/5.6
Whereas it should be on:
/Users/my_user/my_project/build
Weirdly enough this seems to only happen on my local. Is there anything I might have missed on setting up the gradle?
I am using spring-boot. I have my tests segregated in the following manner
tests
|java
|endtoend
|org.mycompany.tests
|integration
|org.mycompany.tests
|unit
|org.mycompany.tests
When I run a mvn test or package everything inside tests folder are running. I want to run the test within individual folders. Intellij is able to run unit, integaration and endtoend separately.
I saw posts for running tests within a package. All my different test folders have the same package structure. So filtering by test packages will not help me.
If intellij is able to run the folders individually, I think I am just missing the command to run it from the cmd line. Please advise.
So I've managed to get jasmine maven plugin to work with maven and our js unit test.
All is running well, but i found when there's a test that failed, bamboo will say it failed, but the error is "No failed tests found, possible compilation error ocurred".
I've tried to get it to parse TEST-jasmine.xml result by specifically specify the folder JUnit parser needed, and get jasmine to write to that folder using jasmineTargetDir tag in pom.xml, but it's still not finding the right result. Jasmine faithfully write the test result to the folder, but seemingly JUnit is not parsing it?
Any clue as to why and how to solve the issue?
Running on Bamboo v 5.14.3.1 I've configured the Maven task of Default Stage to search for test result files:
And then produced fake failing test. After that the build failed with failing test:
Hope this helps
Bamboo gives us the ability to run phpunit tests, but likely given a lower popularity, nothing for phpspec.
I suspect however (Googling) that it must be possible!
https://revive.beccati.com/bamboo/browse/PHP-PHPSPEC-813/test
Has anyone successfully fed phpspec tests into Bamboo?
Thanks.
One option is to run the phpspec test as a Script Task. If the task returns a non-0 exit code, the build fails. phpspec obligingly returns a 0 exit code only when all your tests pass.
In order to do this you would need to ensure that phpspec is available to your Bamboo build. If you're using Composer, you can add it to the require-dev section of your composer.json file.
Then, in the Plan Configuration, under Default Job (or some other job), you can add a new task of type Script. This Script Task can then make a call to phpspec:
vendor/bin/phpspec run 1>&2
You may also want (as above) to redirect the output to stderr because Bamboo seems to suppress any output on stdout. This will then allow you to see the output of phpspec in your Bamboo log.
The answer was to run the test with the junit formatter. Bamboo has built-in support for the former, and this made the tests run smoothly.
So my situation is that I finally finished configuring TeamCity for CI. I got it to run my unit tests with some friendly help on SO.
However, many unit tests fail because there needs to be a config file alongside the unittests.dll once it's built and ready to run.
I've written a simple Command Line step with:
copy %system.teamcity.build.checkoutDir%\xx.configfile <destination>
The destination is the problem, I need it to be the Out directory teamcity creates.
TC creates SYSTEM_<machinename> <datetime>\OUT. An example:
C:\TeamCity\buildAgent\temp\buildTmp\SYSTEM_GIDEON 2015-07-02 16_51_09\Out
In there is my unittests.dll and I want to copy my config file there. What environment var or (anything else) can I use in the command line script?
The (1) Build Tests is a Step then I want to run the (2) Copy Config Step Then (3) Run Tests. After step (1) I have that xxx\xxx\Out directory and I need that directory from some variable.
I'm using Teamcity 9.0.2
Your problem is not to do with TeamCity I don't think, it's to do with the way that MSTest works. You need your .config file to be a DeploymentItem and have your tests deploy it to the directory that MSTest will run the tests in.
To be honest I'm surprised that you don't have this problem running locally, and it makes me think that you must be using some other test runner (like ReSharper) to run the tests if you have not seen this problem on your local machines.