2

I have a Bamboo server which is connected to source control system. If new code is added to the source control system a new build is triggered in Bamboo, the outcome of this build are two artifacts: "code.jar" "automated_test_scripts".

Jar file gets deployed to my test server. But what about the automated_test_scripts should they be run directly from Bamboo itself or maybe a dedicated test server that just handles running automated tests or should it even be copied to the test server and run from there, what would be best practice concerning these options?

JonB
  • 804
  • 3
  • 12
  • 40
  • Can you please describe desired flow with automaed_test_scripts? Do you want them to run against test server? – Oleksiy Chystoprudov May 25 '16 at 10:50
  • automaed_test_scripts = postman collection and postman environment fiels. both a jason files. These files will be run with Newman(postman/jetpacks command line tool) against the .jar file which was deployed to a test server. Maybe those files are not the issue per say, but rather the next step which is to parse the junit file from the Newman run and inject the results into Jira/Xray. Hope this declares this better. – JonB May 25 '16 at 12:21

1 Answers1

3

Best Practice would dictate that your build is not complete until all unit tests have completed successfully. Otherwise you don't know if the build is successful. It would be best for Bamboo to automatically execute your unit tests as part of the build and report on the results.

This could be setup as a separate stage in your build, or even just later steps in the same build job. If its a separate stage you could execute it on a bamboo remote agent on a dedicated test server if you wish.

Once all builds are complete you then have artifacts that you can deploy to staging, UAT and production and have confidence in the quality because they have passed all unit tests.

shonky linux user
  • 6,131
  • 4
  • 46
  • 73
  • Bamboo is already set in that way you describe in your comment. My concern is what is best practice when code has been build and all unit tests have passed. I want to conduct a least automated ui tests and integration tests as well. I have created deployment scripts that take care of deployment of the source code to a test machine, but where should I run my automated tests from? My concern is that if I run them from Bamboo I could be contaminating Bamboo with to much logic that mayb would be beter executed else where! – JonB Jun 05 '16 at 20:09
  • On my own project I have a child build plan that runs the integration tests. The main build plan triggers the child plan. Integration test artifacts are built by the main plan, the child plan waits until dependent systems are available (they may be in use by other test runs), then deploys to the Integration Test environment and executes the integration tests. – shonky linux user Jun 06 '16 at 00:07