Setting up Protractor e2e tests with Bamboo CI - selenium

We use Protractor to automate our angular app and now need to run those protractor tests from a Bamboo CI server.
I'm new to Bamboo and was wondering if anybody could either show me how to or point me to a web article that would show me how to trigger/execute my protractor tests from Bamboo server.
Locally, we run the tests using gulp protractor which all run and pass; Now I'd like to execute those same tests from a Bamboo server.
I was only able to find some articles on Google that shows how to set up Selenium with Bamboo. I understand that Protractor uses Selenium under the hood but am just not sure if Protractor would follow the same steps as Selenium does, when setting it up on a Bamboo CI machine.
If Protractor follows a different setup than Selenium on a Bamboo CI machine, could someone please point me to either another article or simply show the steps here if it's simple to do.

This question is already a few months old, but it's still unanswered, so I try to help. ;)
I haven't tried it by myself, but there is a gulp task in bamboo. (as also mentioned here: gulp tasks execution in bamboo)
I think you have to install node.js on you bamboo server and then you can just add the gulp task to your plan and configure it for your needs.
Short field description:
Node.js executable: should be filled if you have installed Node.js on your bamboo server, or select the correct one if you have installed multiple versions of Node.js (I haven't installed Node.js, so there is no executable available for me)
Gulp executable: I'm not so femiliar with gulp, but I think this default value should be correct in the most cases.
Task: In your case you should insert protractor here

Related

I am using Selenium with java , and I want to do the setup of CI ustin Gitlab CI

I have been trying to find out how should I execute the Selenium Test (Java) using gitlab CI
I have created an automation framework and I am able to run the maven project via jenkins
I wanted to run the same maven project with the help of gitlab ci runner
My Code will be available on git and just need to trigger the execution as a when developer checks in the code
Please help me out with this setup, I have been trying to find out the solution but couldn't figure out any
I suggest you to read about jeknins and gitlab hooks here: https://docs.gitlab.com/ee/integration/jenkins.html
, In general, these hooks "follows" any push you perform to you gitlab repository, and run the desired build on them, including pulling the latest code.

jenkins selenium tests ci

I have created a Jenkins maven task to run selenium tests on one project, and now I want to use these selenium test in a proper way for CI.
Actually, I have a Jenkins task which 1-builds the project, 2- uses sonar, 3 - deploys the project. I would like to add the selenium tests to this process. The question is: can I run the selenium tests before deployment? Is it necessary to do a previous deploy for the selenium tests before the real deployment? Is there anyway to simulate a deployment or something like that so I can run the selenium tests?I would appreciate If you could advise me on how to do or any plugin which could help me.
As per my understanding, To deal with the scenario you should run the selenium test on QA environment. If all test pass then deployment should start for staging etc.
Additionally, once the deployment is done on staging, then selenium script should run again, test staging and if something went wrong then rollback from staging should be happened.
I never tried it but you can use below github plug-in for deployment(in case you are using github) :-
https://wiki.jenkins.io/display/JENKINS/GitHub+plugin
If you are using SVN then use below :-
https://www.packtpub.com/mapt/book/application_development/9781783553471/3
Hope it will help you :)

Selenium test schedule via Jenkins

I would like to schedule task which is login to a partner site and prolongs a license. I found that it can do Selenium. After I faced issue with scheduler and found article here http://www.learnseleniumtesting.com/ about Jenkins configuration. Now I cannot understand how to run test from selenium in Jenkins. Is there need good knowledge in python or java ? Also I found that RC standalone selenium server is deprecated and avoided to be using now. Is there need deep diving into using these tools for executing 5-7 action on site ?
I feel that Selenium is great for doing any tasks that you may find yourself doing over and over again. For "prolonging a license" on a partner site I think this is the perfect tool for you. We setup Jenkins to run certain Selenium tests after each commit and other Selenium tests every night. If you need me to go into more detail about how the setup looks I would be glad to show you more details.
Adding Jenkins build information to help show how we did it.
1) The first step is to get a build in Jenkins that will compile any code you have and deploy a war if needed with something similar to the following: mvn -P release clean test package. We set ours to build #midnight shown in the picture below.
2) After this build finishes it triggers the next job to run this command shown in the image below: mvn -Dtest -P smokeTest clean verify

Bamboo recognising JBehave tests

I have setup Bamboo to run JBehave tests on a remote agent (with JBehave-web plugin launching test using webdriver), and everything runs fine. Only problem is after the execution is finished Bamboo shows no test executed. I can see the option in Bamboo to select the output of the test results, but it has to be a JUnit xml, and Jbehave reports are only generated in plain text or html.
Any idea how to solve this?
Thanks
I ran in the same situation about a year ago. JBehave "doesn't" integrate with Bamboo out of the box. Although, they have a plugin for Hudson CI.
In my case, such as yours, I resorted in running the tests through the Surefire plugin; the outputs are considered as JUnit tests results and Bamboo can recognize them.
Hope it helps.
There is a really simple way to do this. And I'm currently doing this for our build system.
Write a simple parse script that transforms your plain of html report into JUnit compatible results. And add that script as a task in your Bamboo task, then use Junit parser to parse the results. Boo! You're done! Plus, you've got the capability to quarantine!
This is way much faster than writing a plugin for Bamboo, which involves considerable more time to learn/write.
Setup JBehave with Maven.In Bamboo build plan use Maven task to run it. For getting results in Bamboo use JBehave Task for Bamboo. It will convert JBehave scenarios in tests in Bamboo. If scenario names contains JIRA issue ids, it will link them to JIRA issues.
https://marketplace.atlassian.com/plugins/com.mdb.plugins.jebehaveforbamboo/server/overview
Sample JBehave as Maven Project
https://bitbucket.org/vikasborse/jbehavesampleproject/overview
Download or clone this repository on your local machine.
To run navigate to this project in command line and use command:
"mvn integration-test"

Setting up Hudson with Selenium RC to run tests written in C#

I just deployed a Hudson server and configured it to checkout, build and deploy to a testing http server.
Now I want more =)
I have some Selenium RC tests wrtten in C#/.Net, using the MbUnit infrastructure, that runs ok on Gallio Icarus.
How to setup Hudson to run these tests? Our is in a Windows 2003 server.
I was thinking about just setting a batch script that runs the tests. But how to run them in CLI? Is there a CLI test runner that could run our tests?
Hah! Just found out.
I have to run:
Gallio\bin\Gallio.Echo.exe path\MyTestAssemlby.dll
When Google fails you, try searching your own PC =)
If you prefer NAnt, MSBuild or PowerShell you can use those too...