How Jasmine with Selenium works for UI automation testing. What is the role of Jasmine in this?
Related
Just want to understand how can we integrated our selenium scripts using cucumber can be integrated in Jmeter?
or any other way we can add any Jmeter plugin to our selenium scripts or some extra configuration is required, so while running automation scripts the Jmeter report is also generated.
Cucumber has many faces so you need to be more specific regarding the programming language you used for your tests.
For example if it is Java and JUnit - you can easily integrate your tests via JUnit Request sampler by compiling your tests into a .jar file and dropping it to "lib/junit" folder of your JMeter installation. Of course you will need to have the necessary Selenium libraries in JMeter Classpath.
If your tests are in Ruby:
Download JRuby jar and drop it to lib folder of your JMeter installation
Install WebDriver Sampler plugin using JMeter Plugins Manager
Open JMeter and add WebDriver Sampler to your Test Plan
Select ruby from language dropdown and transfer your existing Ruby code into "script" area (i.e. copy and paste)
Be aware that real browser based performance tests are very resource consuming so consider converting your Selenium tests into "pure" JMeter tests instead of running them in multithreaded manner.
We use Cucumber with selenium in a maven project to automate our functional tests and Jenkins for the continuous integration,
Now we start to use AngularJS front-end in the project
I'm not sure if it's a good idea to start using Protractor ?
if yes how can we use'it in the same maven project along side with cucumber?
Protractor is not java based. You need to use Javascript/nodejs in order to run Protractor. Normally in nodejs, there are separate task runners or build tools, such as Grunt/Gulp/Webpack. There might be a way you can leverage to run protractor with maven: https://github.com/greengerong/maven-ng-protractor
IMHO if your application is pure angular application, protractor can provide you some level of conveniences, if your application is in the middle of migration, I rather stay with what you have right now, to me, it doesn't provide much business value on migration from selenium to protractor.
We have a node.js project that we are building with Atlassian Bamboo. We are doing CI/CD, or that's the plan. We are using Mocha to do Unit/API testing. But I didn't see anything in the task types to do web UI testing. We have used Selenium in the past, and that was the idea this time as well. But there is no nice, easy to use test runner and parser, as there is with Mocha.
Anyone have any experience with this in Bamboo? Any suggestions on how to do this?
I am using Selenium with Bamboo and I have configured Maven plugin and TestNG Parser . You can pass Selenium Grid URL/Base URL etc in environment variables.
Could someone help by defining the relation between the following: Selenium, Webdriver and most importantly test-unit.
Thanks!
There is no relationship between Selenium and Test-Unit.
Selenium is the overall project which combines RC, WebDriver and Grid.
WebDriver is the newest and more stable piece in the project, allowing you automate a browser using much more stable so-called 'native events'.
TestUnit is simply a unit testing tool for Ruby. You write some tests using Ruby, run it using TestUnit, it verifies if your test passes or fails. You can use this to write Selenium tests.
This is mostly mentioned on the Selenium site:
http://seleniumhq.org/docs/03_webdriver.html
Can Chutzpah run qunit tests from a url? I need a lot of server-side injected markup and json data in my qunit tests, so I like to run the test suite within my visual studio project on localhost instead of mocking tons of test data in my test.js files.
As of version 2.4 Chutzpah now supports running against a remote url. See the documentation here.
Maybe it helps to share our testing strategy.
We use chutzpah for javascript unit tests. No dependency on a running server. The tests run very quickly as part of the build. (But we are not testing generated javascript code which is your scenario).
We test against running server by writing tests in JavaScript and running them with PhantonJS. See my answer for an example of one of our tests: automated functional web GUI testing frameworks (asp.net)
If you don't like writing the tests in Javascript like this (it is not as nice as using a unit testing framework - like qUnit or jasmine) you could checked out CasperJS.