Selenium test schedule via Jenkins - selenium

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

Related

Integrate Ranorex to Jenkins

I'd like to Integrate Ranorex to Jenkins and i have 2 staff i'd like to check
- First should only on the slave where the Ranorex automation should be triggered that Jenkins is not started as a service or on both master and slave
- Second i'm working with JenkinsFile pipline and i'd like execute Renorex test from this script (jenkinsfile) but i couldn't found any solution any ideas
Thanks a lot :P
I can help you with the first question you have:
The Jenkins service must be executed only on the machine where the automated tests are to be executed. You must also have Ranorex installed on that machine with a runtime license available. Jenkins can be configured to provide continuous integration, so each time you update the source code from Ranorex Jenkins will be able to automatically compile the solution and run the automated test.
Ranorex has an add-on that you can install in Jenkins to integrate the run configurations in order to be launched.

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 :)

VeriFIX test automation in Jenkins

We are working with a client that uses VeriFIX to test their FIX message flow. Whilst they have built up lots of tests in many suites, it is a manual process to run them and to collate the results.
On the VeriFIX website it says
Incorporate tests into nightly builds using VeriFIX’s command-line script player.
but I cannot find any details on how to to it. Does anyone have any experience in running VeriFIX tests in a continuous integration server (ideally a Jenkins pipeline).
Many thanks.
You can run VeriFIX playlists in batch mode from the command line:
"%VERIFIX_HOME%\verifixbatch\verifixbatch.exe" -version "FIX (x.y)" -playlist "myplaylist" -disablelogging "false"
If you have received the user manual with your installation of veriFIX, the details of how to integrate with CI are in there.
To integrate veriFIX with Jenkins you will create batch files containing tests and run the batch files as jobs in Jenkins.
The placement of your veriFIX installation is important. If your veriFIX is on a users machine, as is often the case, separate from the environment machine Jenkins resides on, there can be difficulties getting the tests to run.
If you have a centralised install of veriFIX things are much easier.

Setting up Protractor e2e tests with Bamboo CI

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

Hudson CI: cannot test grails-app

I've tried in each and every way to test a grails-app using hudson. I've tried testing with maven, I've tried testing with the grails plugin and I've tried testing with a shell builder it seems that building via shell is the only thing that works..
Every time I get the same error:
org.hibernate.HibernateException:
contains is not valid without active
transaction
But If i go to a shell and type
grails test-app
everything runs fine.
Does anyone have any idea on what's going on?
I'm using CentOS with Java 1.6, no slaves, just a simple hudson deploy over Tomcat6.
I've tried both with maven and grails builder, both fail.
Edit: it seems that if I run both unit and integration tests on the same command (either with grails or with mvn) the integration tests fail always.
Hudson/Jenkins usually just use the command line for executing grails plugins (You should be able to confirm that from the build output). You could probably add a pre build step to dump the environment, so you can see if anything there (or in your own shell) cause it to be fundamentally different.
Otherwise try to log in as the hudson user and find the hudson workspace and repeat the process manually. That has been the easiest way to debug hard problems like this..
regards