machine.specifications
machine.specifications copied to clipboard
Support for CI integration and reports (Bamboo etc)
Team:
I am not sure if this is the right place to ask this question. We have set up a Bomboo Server and I am planing to use MSpec for writing unit-tests. What I want to do is to configure Bomboo to execute all the unit-tests/specifications. In case if the unit tests fail, server should send email with error details to all the users.
I have searched over internet but haven't found information on how to integrate MSpec with Bomboo to achieve above mentioned functionality.
Any help will be greatly appreciated,
Thanks in advance
Do you know how to run programs on Bamboo CI?
Yes Alex, we can run the programs on Bamboo CI.
Then run mspec.exe with your compiled spec assemblies and the --html <file>
option. Define the HTML file as a build artifact (in TeamCity they're called artifacts, no idea about Bamboo).
What the Bamboo server uses to notify you about failed specs is beyond our control. Perhaps it's possible to attach certain build artifacts. Perhaps not. CI servers typically check the exit code of the programs run and error out /notify users when something returns exit code != 0.
In TeamCity you could have a second build config that uses the artifacts of the "test run" build and send e-mails with attachments yourself. Then again, TeamCity will also report test errors directly in its failure notification. Again, I have no idea about Bamboo.
Let me play a bit with Bamboo CI and will update you. Thanks for quick response.
@sonalsatpute Any update on this? I'm also trying to configure bamboo CI to run mspec tests.
@ot-matt-sell :
I am not sure if this is the right way to configure it but below is the step how I have configured MSpec.
- Create the Stage (MSpec)
- Add the Job
- Add Task -> Select Command from list
- Click on Add New executable and give the path for you MSpec Console Runner
- In Argument test box C:\Users\sonal\bamboo-home\xml-data\build-dir\131073\SPRIN-TEST-JOB1\Build\MSpec\sprinkler.specifications.dll --html C:\Users\sonal\bamboo-home\xml-data\build-dir\131073\SPRIN-TEST-MSPEC\sprinkler.specifications.html (please change the path as per your folder structure)
- Save
Bamboo should be able to trigger the MSpec runner here is the some screen shot of my MSpec runner result. In case your tests fails Bamboo will send you email for same.
Even though I have 2 test it says 0 test in total
Where as Bamboo has very good in-built support for NUnit below is the screen-shot for reference I would like to to have something like this.
When you click on any test you get the full details
have no idea how bamboo works. But you need to look into the doco like https://developer.atlassian.com/display/BAMBOODEV/Test+Collection+and+Reporting and then write a reporter. Samples can be found here:
https://github.com/machine/machine.specifications.reporting/tree/master/Machine.Specifications.Reporting/Integration
Send a PR, I'll merge, release and there is your bamboo support :dancers:
@sonalsatpute hi sonalsatpute, any update for this issue ? I'm also try configure run mspec test on bamboo. Now still confused. Can you help me ?
@dennywu : have you try the steps I have mentioned above on my comment on Apr 23 ?
Tried it. But not working. I used window AMI, and change to another ebs. When i try checkout source again, i have got problem with user permission.
Do we have a nice solutiong to this?