I have been trying to get Bamboo working with codeception tests. I am using codeception to test my code in a symfony project.
After some research I found an article on how to setup Jenkins with codeception.
Once read I figured out that I should use Ant to run the codeception commands that run the tests.
The problem is I don't really know where to put everything. This article explains all the fields for a new Ant task but nothing seem to work.
Can someone please help me?
In case anyone else comes across this, this is how I have gotten codeception working in bamboo.
In Admin > Server Capabilities. Add a new executable for Codeception with the path /usr/local/bin/codecept.
In your job, create a new task of type Command. Set the executable as Codeception. The arguments should be run --xml (and any others you need).
Next, create another task with the type of JUnit Parser. Set the custom results directory to tests/_log/*.xml.
This works perfectly for me.
Additional: If you do not have admin rights to the server, set the command executable as PHP and add ./vendor/bin/codecept run --xml as the arguments.
Related
My runner file in my local system
My Jenkins configuration
Feature structure
As per my requirement, I have created separate features
{IndiaTransaction,CreateTransaction,BrazilTransaction,Mexico Transaction.features}
The above syntax will run all the features But I want to run specific features in my Jenkins, So how to configure it? I have tried below 2 methods it is not working, please help me to resolve
You can add a build step with Execute shell in Jenkins for the project and use the command below:
mvn test -Dcucumber.options="--tags #CreateTransaction,#BrazilTransaction"
And you can remove the tags option in cucumber runner class because the same thing you can do with -Dcucumber.options="--tags #tagName" in the command line
Please make sure you are using same tags in the feature files as well as in the command line.
I have my selenium tests written using SpecFlow(+SpecRun) and NUnit framework (v.3.8.1.0). I've configured Jenkins to run these tests. My Jenkins Windows Batch Command is as follows:
"C:\Program Files (x86)\NUnit.ConsoleRunner\3.7.0\tools\nunit3-console.exe"
C:\Projects\Selenium\ClassLibrary1\PortalTests\bin\Debug\PortalTests.dll
--test=TransactionTabTest;result="%WORKSPACE%\TestResults\TestR.xml";format=nunit3
When I trigger build test seems to start running as I'm getting as far as end of NUNIT3-CONSOLE [inputfiles] [options] with spinner indicating that test is running but it actually never ends and estimated remaining time is: N/A.
Now, when I run this script with windows cmd.exe:
"[PATH to Console.exe]\nunit3-console.exe" PortalTests.dll -- test=TransactionTabTest
this test pass successfully and so does in VS.
Now, I know this is very generic question but any clues will be much appreciated.
As you are using SpecFlow+Runner/Specrun, you can find the documentation how to configure it for the different build servers here: http://specflow.org/plus/documentation/SpecFlowPlus-and-Build-Servers/
I managed to install Google Test on Jenkins.
I use cmake to build the test executable and everything works fine.
The stupid question I have now is:
How do I automatically let Jenkins run google test?
Do I have to write a shell script for this or is there a better way?
I know that one could run it in ant but since I use cmake I doubt that this is the right way to go.
There's no builtin or pluggable "Googletest automation" for Jenkins.
You've built the test executable with CMake in a build step.
Execute the test executable in a subsequent build step
with xml test reporting enabled
and configure the build to archive or otherwise publish the test reports.
Im working on getting our CI (Jenkins) to use and run our qunit test, we have qunit-reporter, qunit.compposite and phantomjs to execute the whole. Im not ant expert so im using windows batch command as a prestep with the following command
phantomjs src\test\webapp\js\runner.js src\test\webapp\jquery.all.test.html > test-report.xml
Now this runs and generates the junit xml file, with a few issues, firstly since I use pipe phantomjs performance information is also put into the file so that's my first issue
My second issue is that I have no idea in the world how I can get Jenkins to actually read the xml file instead of just considering it random stuff, similar to it interpreting when we have junit test run.
Just for reference the project is a maven project.
All advice is welcome :)
In Jenkins, configure your job, add a post build action, select publish JUnit test result report then add the path to your xml file in the requested field.
A couple years ago, a colleague of mine and I worked on getting PhantomJS to run QUnit tests and output JUnit XML that Jenkins can consume:
http://www.cameronjtinker.com/post/2013/09/24/QUnit-JSCoverage-and-Jenkins.aspx
I had forgotten to post this on my blog after we worked on this so I just posted it today when I saw your question. Much has changed since 2011 when this was originally written, but it should have most of the same concepts involved.
So, we have a grails app set up with a Hudson CI build process. We're running unit tests, integration tests, and about to set up Selenium for some functional tests as well.
However, are there any good ways of fully testing a sites links to make sure nothing has broken in a release.
I know there's link checkers in general, but I'd like to have it be a part of the build process, so a build outright fails if something isn't right.
WebTest has a verifyLinks step you could use: http://webtest.canoo.com/webtest/manual/verifyLinks.html
You could install the webtest plugin (it should play nice with Selenium) and just have a single test that checks links.
cheers
Lee
I'm using selenium plugin (http://wiki.hudson-ci.org/display/HUDSON/Seleniumhq+Plugin) with test recorded from both developers and functional people. We start the new instance of the Grails app from the Hudson build with the Postbuild (http://wiki.hudson-ci.org/display/HUDSON/Groovy+Postbuild+Plugin)
What we ended up using was a command line program called linkchecker that we could install by apt-get and we ran from within our build script.