I have 2 jobs in Jenkins:
Build and run unit tests
(Build and) run integration tests
Job-2 is a Downstream project of Job-1.
Job-1 initiates build and run unit tests on it.
Job-2 initiates build as well and run integration tests.
I would like to change that, and make Job-2 to run the tests on the result build that was initiated by Job-1.
You could use Copy Artifact Plugin and use Job-1 artifacts from Job-2 to run some tests on them. Refer to this post for more information. Hope it will help.
Related
I needed to setup a Jenkins pipeline and I wanted to know if unit test should run before the actual compilation of the project
The Jenkins pipeline currently runs unit and Integration test before the bundling and wanted know if that's ok
I have series of test in Jenkins Pipeline like Integration test1, Integration test2, smoke test, End-to-End Test. Out of these test I want only the End-to-End Test to run every night for master irrespective of the SCM changes.
For example refer attached picture of Pipeline flow
In this I would like to run End-to-End Test every night where as other test should run whenever SCM commit happens. And End-to-End Test should take the latest available artifact from Master.
Scheduling in Jenkins is applicable to jobs. You need to refactor the End-to-End Tests into a separate Job. It can be a simple free-style job or a pipeline job. Then, you can schedule this job by configuring the Build Triggers > Build periodically.
This job can also be invoked from the pipeline by using the build job dsl:
build job: 'e2e-test', parameters: ...
We use multi configuration job to test various combination of 2 separate components for compatibility test. These are our compatibility acceptance tests. We perform the following steps
Prepare test environment using docker and docker-compose where we deploy these components. (Pre build for us)
Run multi configuration job to test compatibility
Clean up - stop containers(Post build)
We have dedicated jobs for step 1 and 3 and use multijob for consolidated view.
Is it possible to have a consolidated one job which does that ? Possibly
Before starting the parent job of multi configuration, we set our environment.
Run all combinations of multi configuration
Parent job post build does clean up.
You can use "Prepare Env for the run" to setup your environment
and using the "Trigger builds on other project(Build Step)" combinations of multi configuration can be run,
and at the end with in the same job using Post build actions should be able to cleanup can be done.
I am building two functional selenium test scripts from Jenkins that I want to trigger the test to run automatically once the build release of the project is done.
The project is running on Bamboo, I am looking for any way that Bamboo can notify Jenkins about the result "in my case must be success" and then my get test scripts to run automatically
Any help will be appreciated
Add task in your Bamboo build to run wget or curl command which will trigger Jenkins build: https://www.nczonline.net/blog/2015/10/triggering-jenkins-builds-by-url/
I have a basic setup: some source files stored in GitHub that are pulled and built by a Jenkins job.
Now I'd like to run the unit-tests automatically when the build is done (I'm using NUnit if it can help).
I could add another build step to the "build" job to run nunit-console but I'd like to separate the build task from the unit-testing task, so that in the Jenkins dashboard I can directly see what is broken: the build or "only" the tests.
I could create another job that would pull the code-source too but it would duplicate the first job.
What's the simplest way to run the unit-tests directly on the binaries produced by the first job (run second job in the same workspace? copy the binaries? ...) ?
Thanks for any input.
You could use the Copy Artifact Plugin to copy the artefacts to another job and then run the unit tests but this may not work, depending on how C# handles packaging and the project is structured.
It look like you can use the NUint Plugin to publish the results of your tests so you may be able to use a single job as I don't think that the tests will run if the previous build step fails as they don't for JUnit tests