I need to run my web application in different browsers/platforms via the Jenkins plugin Sauce OnDemand. It is really ridiculous that the official guide of the Sauce Ondemand talks about everything but the most basic thing - how to load test cases/suites. Anyone has idea how to do it?
Just figured it out. Need to install the Selenium Builder plug in to Jenkins.
Steps:
Add the Selenium Builder plugin to Jenkins.
Upload test script (html or json) to git repo.
In Build, select Invoke Selenium Builder Script.
Put script file name there(suppose the script is directly under the workspace folder).
Build with the URL of the git repo.
Done.
This solution can only run the script against one browser, not multiple browsers. Trying to figure out how to run multiple.
Update
Figured out how to do test on multiple browsers:
Need to install Matrix Project plugin in the Jenkins, create a new job of Multi-configuration Project, select target browsers in Configuration Matrix and Sauce OnDemand Support as well.
Related
I made a couple of auto-tests on the web application using Selenium IDE, but selenium IDE saves tests as .side file. Is it possible tests saved as .side file integrate into jenkins and do the job in jenkins to run for example once a week?Does anyone have experience with this?
You need to setup the Selenium web driver for Jenkins... Check out this tutorial
If you need more specific help with Jenkins configuration for scheduling there is a lot of documentation for that you can google for.
run .side file via selenium-side-runner command-line runner
$ selenium-side-runner /path/to/your-project.side
you might need to meet some dependencies, all well explained in the link.
I am working in IBM content navigator where i am customizing it functionality like menu , grid etc.
What process i follow is this?
I create plugin in java+ant as usual.
And then deploy the plugin in IBM content navigator admin Plugin option manually (open application , then going to plugin menu , loading plugin , testing manually).
Same i have to do for INT environment, manually take jar and open navigator and deploy plugin.
But this is manual task , i want to automate it
I want to automate it by jenkins or other CI/CD tool so no manual task need.
I will push my code to git and from there the CI/CD pipeline pick it and deploy.
I have deployed for java , node.js ,database application by this , but i am not getting how to do plugin deployment of IBM content navigator by CI/CD?
Any blog and experience most welcome.
Something I have done was to use Selenium. At first a copy task would move the plugin to the server, then a selenium task would click through the gui for (re)loading the plugin.
A colleague of mine late made a maven plugin to do the task (unfortunately I can not share that with you).
It also looks like there is Jenkins plugin to do that (but I haven't checked it out) IBM Content Navigator Remote Plug In Reloader
Also the following blog post Automated delivery of an ICN plug-in for continuous delivery may be usefull.
Old article, but it must give you a good idea how you can do it.
The quick overview, is to imitate all API call IBM does while reloading plugin using lets say CURL operations. So yuo can wrtie script to call these API call's.
The article link:
http://www.notonlyanecmplace.com/automated-delivery-of-an-icn-plug-in-for-continuous-delivery/
I have a problem. I need to build a job in my Jenkins server hosted by macmini (localhost) to automatic build a deploy for my mobile hybrid apps. That's apps was building with ionic2, and need a deploy for Android (apk) and for iOS (ipa).
But when i run a build from Jenkins, with this shell command
I get this error
that's not all... because i try to execute, from the jenkins folder, the npm i and the result was this:
When i try to build my application from other "folder" and not from jenkins, they works correctly. How i can solve?
Without more information hard to say; you can either just script the things you do when you deploy "manually", or you might want to try a CLI tool like https://www.bitrise.io/cli or https://fastlane.tools which can auto-scan your project and configure a suitable configuration which is then easier to tweak.
In case of Bitrise CLI the base config can be generated with bitrise init in the repo root, and you can also use a visual editor to modify your configuration: https://discuss.bitrise.io/t/how-to-experiment-with-bitrise-configs-locally-on-your-mac-linux/1751
After a lot of time, just find the solution. Jenkins have a own "tools management". So i need to install, into jenkins, a property version of nodeJS, Npm and all other tools i need to deploy the application.
So, first of all you need to install property plugin (in my case nodejs).
After this, going into Jenkins Management System and configure a NodeJS version. That's all
I'm just getting started with Jenkins and I have a few doubts that must be silly, but I'm stuck at it.
After I build my project Jenkins save the build file in some specific path?
Using Ranorex for automation test, is it better to put my files locally on the server or push them to a repository?
Note: I just start tried to use this, at this moment I can check for changes at BitBucket, build the file, build the Ranorex test and run the test.
Jenkins is quite a versatile application that allows system setup to specific needs and requirements of the test project. So i'd say go with the way that seems most logical/easiest. It's kind of a learning process as well so you will be able to understand the working flow of Jenkins itself.
But to answer your 2 questions:
1) By build files i believe you mean the test reports? - For this I actually use the Jenkins UserContent folder. This requires the "Copy to slave" plugin to be installed. With this you will get an additional Post-build Action where you can specify the files that will be copied over to the UserContent folder. But don't forget to specify a common layout for the naming of report files through the Ranorex run parameters ("/rf"). The UserContent folder actually acts as a web server and you can directly link the URLs for email reports. (eg. "http://Jenkins-server.com/UserContent/Regression-Client-Test-#1.html")
2) This totally depends on the system setup. But i can give you an example on how our system is currently set up. So we have Jenkins which runs on a Linux machine. It is only used to manage and run the tests and the actual machine does not include the automation test project. Then we have the test machine which runs on Windows and holds the actual automation tests. This machine is connected to Jenkins through the Slave functionality. So basically when someone starts a test job Jenkins from the Linux machine sends a command to the slave to start the automated tests. When the test run has finished post-build actions take over and copy the report files from the Slave machine to the Linux machines UserContent folder.
Now when talking about the test project management. It's a good idea to use a gir repository which will add another layer of somewhat "security". But if you have a small team (or you are the only test developer) then there is no actual need for it. You just copy the project to the test machine to a specified folder whenever needed/updated and you are ready to run it.
Regards,
Martin
I am new to Jenkins. I am trying to configure Jenkins to run my Selenium tests on multiple browsers. So I thought multi-configuration project would be a best choice. I am using Sauce labs for performing cross-browser testing.
My selenium source code is on my local system directory. I have not uploaded the same to any of the repositories. I have configured a multi-configuration project with a custom workspace pointing to my local source code, and selected "none" in Source code management section.
Now, when I build the job, the job creates workspace for each browser combination. Eg: <project workspace>\SELENIUM_DRIVER\Windows 2003firefox16 and <project workspace>\SELENIUM_DRIVER\Windows 2003internet explorer8. But the files are not copied to each of these workspaces automatically. I need to copy my files manually into these directories for it to work.
Is it necessary to have Repositories like SVN, CVS or Git for this to work. Or is there a way I can run the build from my local system?
For this to work, a Repository is not required,
but you do need to have some good way to access your artifacts and selenium code.
Suggest you drop the artifacts on a shared drive as a preliminary step,
and also put your selenium source-code on a shared drive, as a practice -
this will allow you to run multiple tests from multiple machines.
Cheers