Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

selenium test scripts automatic invocation

Posted on 2013-12-19
2
Medium Priority
?
516 Views
Last Modified: 2014-01-09
Hi,

I have about 10 selenium regression test scripts. i want to execute all those test scripts when I do a deployment to say QA environment. I want to make sure all scenarios are working. I am using java,j2ee, jsf, maven techonlogies for my j2ee webapplication. How do I make sure to auto invoke those selenium scripts whenever the build and deployment of the application happens.

please advise
Any links resources ideas highly appreciated. Thanks in advance
0
Comment
Question by:gudii9
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 36

Accepted Solution

by:
mccarl earned 2000 total points
ID: 39730786
We've almost covered all of this in one of your previous questions. The only missing link is that you could/should use JUnit to run these selenium tests. Since these tests would probably be called "integration tests" (rather than unit tests) my suggestion would be to put these in a separate maven project, have that project "depend on" your main project and put you Test classes in this new project. That way when you build your main project (which happens very often) you don't necessarily run your integration tests, but you can easily run them by running "mvn test" in your "integration tests" project. Then you can setup your deployment to make sure that the "integration tests" project is run before the actual deployment happens. Exactly how this happens will depend on exactly how you "deploy" your app.

And so these test classes that you put in your new project are built using JUnit so they look very similar to any unit tests that you already have, it's just their purpose is quite different. Instead of just doing what is necessary to setup maybe one class that is the target of your unit test, in your integration test classes you need to setup your entire environment (which could entail starting a test web app container, a test database, inserting test data into that database, etc, etc).


As you may be able to see from the above, it's not a small job. And so I can't really give any step by step instructions, because so much depends on your particular environment and application and also I would still typing away on Christmas morning! ;) Have a read of this article to get you started...

http://docs.codehaus.org/display/MAVENUSER/Maven+and+Integration+Testing
0
 
LVL 7

Author Comment

by:gudii9
ID: 39738549
my suggestion would be to put these in a separate maven project, have that project "depend on" your main project and put you Test classes in this new project. That way when you build your main project (which happens very often) you don't necessarily run your integration tests, but you can easily run them by running "mvn test" in your "integration tests" project. Then you can setup your deployment to make sure that the "integration tests" project is run before the actual deployment happens.
can you point me to some example on how to do above.


Instead of just doing what is necessary to setup maybe one class that is the target of your unit test, in your integration test classes you need to setup your entire environment

can you please elaborate on this
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The Quality Assurance engineer of an Agile scrum team must "own" the acceptance criteria for sprint tasks.
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question