I'm going to execute some Selenium tests after each Bamboo build. As far as I see, the best way is to store them in a separate repo and use specific project (or stage in an existing one) to run these tests. But there is an issue, I can't figure out. I'm using deployment plans to deliver product after build to development environment, so I'd like my tests to be executed, only if the deployment was successful. Does anybody know how to properly express this in Bamboo triggers' terms? Thanks you.
1 Answers
It's rather a confusing and complicated process. As we all know selenium
needs a live website to point to in order to execute the tests. There are several ways to accomplish this using Bamboo. I assume you already have the build pipeline set up for automatic deployment. Depending on what you want and how you deploy several agents can be used to execute the tests. Another way is to use Selenium Grid. You want to trigger the selenium
task after the deployment happen using several slaves. A grid creates the Hub and Slaves relationship and tells the hub to execute the tests accordingly. Here is some info about the plug-in that can be used to trigger Selenium Testng
tests. And, of course, as yo said, you want to create the selenium
task to be dependent on the deployment so if the deployment fails then the test will not run. Hope this help!

- 16,081
- 6
- 49
- 73
-
Thanks for reply, Saifur; I decided to use SauceLabs grid to execute Selenium tests and Spock wrap them and use from Gradle, so my main wonder here is how to properly trigger build task after deployment. – sviklim Feb 16 '15 at 08:44
-
@sviklim Can you please explain **how to properly trigger build task after deployment?** – Saifur Feb 16 '15 at 12:07
-
and will [this](https://confluence.atlassian.com/display/BAMBOO/Triggering+builds) help? – Saifur Feb 16 '15 at 12:59
-
the point is, that tests are kept in separate repository and treat as a black/grey box; to execute them, I need a separate 'build plan' (in Bamboo) terms, which could be triggered right after deployment (or with a delay). I've seen this discussion http://goo.gl/KcVF6C and some solutions are quite interesting. But is there a way to achieve build invocation in 'natural' way w\o involving external repositories or REST API? In other words, 'properly trigger..' means 'how to start build task on Bamboo after deployment complete without "voodoo" stuff, e.g., using plugin or build-in tools' – sviklim Feb 17 '15 at 13:21