How to run Serenity BDD Test cases in IE and chrome - serenity-bdd

Can some one help me to know how to run Serenity BDD test cases in IE and chrome browser, I tried the way it said in it's doc and other posts at stack over flow, did not work for . I am using Serenity BDD version is 1.1.1. Help from any one you will be appreciated very much.

The easiest way is to create a serenity.properties file in the project root, with the line driver=chrome or driver=iexplorer
You can also use the same arguments as system properties. Here's the full list of settings:
http://thucydides.info/docs/serenity/#_running_serenity_tests_from_the_command_line

Related

Build Chrome extension to automate debugging - which auto test framework can i use?

I'm currently have a task of making an idea for building a Chrome Extension to automate Debugging web code.
This is a test to get the position in company (not what I'll do in real)
Can I use Auto test frameworks such as Selenium in my Chrome extension?
I've googled but most people care about use Selenium to test a Chrome extension, while I want to put Selenium into my Extension to test people's website.
Thank you guys!

Is it okay to place selenium and appium classes to src/main/java package or in src/test/java

We are creating a Selenium and Appium project in eclipse.
I was wondering if there are rules or right practices or correct location for Selenium and Appium classes?
During our training on Selenium, I notice that location of classes are in src/main/java.
While in our training on Appium the location of classes are in src/test/java.
Is it also okay to put the Selenium classes src/test/java?
Will there be any problem?
Or is it also okay to put Appium classes in src/main/java?
Will there be any problem?
What will be the best practice for locations of Selenium and Appium classes?
FYI, there will be no other code for the application. Just the Selenium and Appium classes.
TIA
Q. Is it also okay to put the Selenium classes src/test/java? Will there be any problem?
Ans: Yes it's absolutely fine, if you entire project is meant for test automation. There won't be any issue.
Q. Or is it also okay to put Appium classes in src/main/java? Will there be any problem?
Ans : Answer is again No
Since you've mentioned
there will be no other code for the application
It really does not matter if you keep your code in any one of the folders
Since It's a Maven project, main/java is for development and test/java is for unit test. Nothing more nothing less, it's all up to you to decide which one to go for.
Cause if you are using TestNg, in xml you would have to give the full file path in order to run the class file, so it does not really matter.

Launching Selenium test from bookmark?

I have some Selenium IDE scripts for automating tasks (deploying to an internal server via it's web interface), and I want to have bookmarks to launch them.
Don't want go to Tools -> Selenium IDE -> search test -> launch test, just want to click a bookmark and let the script run.
How can I achieve this? Am I missing a point?
Don't know if it makes a difference, but I'm currently using Firefox (if I have to change browser for this, it wouldn't be a problem).
Thanks
Not sure whether you be able to run tests pressing on a bookmark as browser plugins are usually run with a key combo. And bookmark is URL. Well the main issue in your question how to associate bookmark
with browser addon launching.
Well, I've investigated a lil bit workaround. Speaking about getting Selenium HTML Test Suites Running Automatically (i mean an alternative to bookmarks) some solutions are possible:
solution 1:
Patch the Selenium server code to support HTML suites.
Build a script to execute your HTML test suites.
Build a script to read the suites’ output reports and consolidate
the information for inclusion into your CC.NET report.
Setup details you can get here
Solution 2:
Selenium IDE plugin for Firefox to create tests
Java to run Selenium Server
Selenium Server to run test suites
Nant to generate reports for CruiseControl.NET
CruiseControl.Net as a continuous integration engine
Setup details here
Hope this be useful for you.
Bookmarks are nothing else than URLs, which makes it impossible to "bookmark" a functionality of a plugin, such as the Selenium IDE.
However, there might be other plugins out there that do what you want. I haven't had a closer look at it, but one candidate could be the Favorites (Selenium IDE) Firefox Add-on.

How to present a Selenium test written in spec or PHPUnit on Hudson

I am setting up Selenium tests on Hudson and looking for an easy way to present nice results such as Project summary and build summary on Hudson.
Currently I have written Selenium test cases in Rspec and PHPUnit's extension for Selenium (I prefer working on Rspec over PHP).
What is the best way to present detailed report for Selenium tests on Hudson CI Server?
I prefer to use Rspec over PHPUnit. It would be very nice if I can use rspec and still integrate well with Hudson CI Server.
I would very much appreciate for detailed comments.
thank you so much for your help
Best regards
If you have the results as HTML files, you can use the HTML Publisher plugin.
Have a look at a similar question https://serverfault.com/questions/184805/how-to-view-test-results-in-hudson/185027#185027 This guy seams to have integrated the selenium tests into junit and therefore the results can be published using the xunit tests.
There are two selenium plugins, one should work for you.
This I have no idea what rspec is I entered rspec and Hudson into google. The second link was this one http://reprocessed.org/blog/easy_rails_ci_with_hudson It should contain everything you need.

Selenium Grid + Maven 2

Is there a good tutorial or does anyone have experience with setting this up ?
I have a Testsuite.html which launches my tests in one browser atm. This is done in the integration-test lifecycle by the maven selenium plugin. I want to run my tests on multiple browsers. I couldn't find any documentation about selenium grid + maven. I hope somebody can help me.
Thanks in advance, kukudas
Selenium Grid and maven are really not much different than Selenium and maven.
Grid is basically a drop-in replacement for selenium-rc. In our current setup we let the automated build system use Grid. It does this by simply changing the selenium-rc url (which is normally localhost:4444) to the grid's url.
Additionally we specify the browser string (*firefox, *iexplore, *opera or whatever) as a system property on the mvn command line, which we pick up when we initialize the selenium client libraries in our code.
So the way we've done it we basically set up 4 different build projects with different browser strings.