Can a Selenium regression run be linked to a an overnight dev build of a website?

Hi there, I’ve been asked a question by a few of our developers which I require a bit of assistance on.

My experience of using Selenium Webdriver so far has been with Java through the Eclipse IDE. The technology stack being used at the company I work for at the moment is purely .Net. The question that has been put to me is……..is it possible for a selenium automated regression pack to start, once the atuomated overnight code build in Visual Studio has been done?

Given that my tests are written in Java, and not in .Net, does this restrict me in being able to do what the developers are after? Or would I need to write my tests in .Net, so that this function will work? Ideally, I don’t want to do that at this stage as I’ve put a lot of time into the Java-build selenium tests.

If anyone has got any advise to offer on this, it would be much appreciated, to help with my understanding of this.

Andy

If build time is fixed then we can do something like this

1. Create a batch file that can start u r regression suite using cmd like if u r regression suite is built through maven prj then we can execute it using cmd
2. Batch file will do following
open cmd,excute command to run regression suite
3. A Cron/Scheduler should be created that can run u r batch file at specific time i.e. after dev build is created.
Cron benefits are u can schedule for daily @ some specific time like run daily at 12 pm

Consider them as different problem statements and try to find solution

on March 25, 2015.

Hi tilston,

I have google the problem statement’s and found it is actually possible to create a cron in java prg to run a specific task at some time

I am new user to toolsqa, so i m not sure we can actually use third party links  in this portal, I m using link because ur problem is very different

http://stackoverflow.com/questions/22163662/how-to-create-a-java-cron-job

Regards
Amit Jain

on March 26, 2015.

Hi Amit, that’s great, many thanks for your answer. I’m going to take some time now to go through what you’ve said and get it set up…..but it looks like it is possible, which is great!

The confusion for me still lies around what Jenkins does, as opposed to Maven? Are they both required? What different elements do they provide?

on March 26, 2015.

I have not worked on Jenkins but heard that is continuous build and Integration option a kind of release tool, not sure but I think it also contains scheduler.

Maven is pure open source build tool by which we can build our java project, It provide various plugin by which we can create directory structure of project, compile our project etc. Its importance comes to effect when opensource library updates at that time it automatically download all dependent jars from maven repository so that our test cases can run fine with changing versions of jar

Here is very good explanation to it.
http://www.toolsqa.com/java/maven/maven-introduction/

on March 26, 2015.
Add Comment
2 Answer(s)

Hi Amit, that’s great, many thanks for your answer. I’m going to take some time now to go through what you’ve said and get it set up…..but it looks like it is possible, which is great!

The confusion for me still lies around what Jenkins does, as opposed to Maven? Are they both required? What different elements do they provide?

tilston1001 Train Answered on March 26, 2015.

What is the build system on your .net code base?  How are you building and running your automation tests?

The answer to your question is yes it can be done, How is the remaining part of the question, which completely depends on above two questions.

Virender

on March 26, 2015.

Hi Virender, thanks for getting back to me.

The build system on our .net code base is the integrated tfs build within visual studio. In terms of how I am building and running my tests……well, at the moment I’m not at that point. I have written up the code in order to run the tests, but I am now at the next stage where I want it to become part of the application lifecycle in that automated builds are kicked off, and that it becomes a well-oiled machine.  However, before doing this I’m attempting to seek out as much advise as I can so that I start off on the right foot.

Hope this provides enough info for you to assist further, Virender :-)

on March 26, 2015.
Add Comment

Andrew,

Basically what we want to do here is
1. Make you test code build and run using either ANT or Maven.
2.  Add your test code to the TFS server.
3. Add the ANT/Maven plugin for TFS from here https://visualstudiogallery.msdn.microsoft.com/2011f516-15a7-4f9a-8b86-1e0894a75739

And ask your Development team to create a Maven or ANT task.

here are some links you may want to look at
Enabling ANT or Maven in tfs: https://msdn.microsoft.com/en-us/library/jj155784.aspx#enablebuilds
TFS plugin:       
https://visualstudiogallery.msdn.microsoft.com/2011f516-15a7-4f9a-8b86-1e0894a75739

I will also recommend that you use TestNG in your tests.

Virender

Virender Singh Professor Answered on March 27, 2015.

Virender, you’re a legend :-) Thank you very much for your help…this does exactly what I need!

on March 27, 2015.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.