!!

Welcome to Selenium Webdriver Forum

As a web user you can read and search through forum content. Once you have registered and signed you can post topics, post replies, set up watch lists, modify forum settings, and use private messaging.

Author Topic: Test Cases in Eclipse & Executing with JUnit  (Read 757 times)

Kumar

  • Web User
Test Cases in Eclipse & Executing with JUnit
« on: April 15, 2012, 05:56:06 PM »
I have completed writing full code for various test cases of my
 application in Eclipse in a single .java file.
 I am using JUnit to run the test cases and get the result as I am not
 aware of using any better tool/framework for the same.
 I think in JUnit each class file will be considered as test case to
 give result with testcase run vs passed/failed details.
 Am I right?
 
I want to write different class files for each test case, is this what
 normally we shall do?
 If yes, I know I can cut and paste relevant test case code to its
 respective class file, but there is an issue that I have.
 I want to make sure that after first test case is run and completed,
 the next test case starts instantly without closing the selenium
 session. Reason being, I am logging into my application in first test
 case and further test cases should be run only when we are logged in.
 
I would also like to know about writing test suite for the same.
 
Thanks,
 Alok Kumar

Abrar Mohammed

  • Web User
Re: Test Cases in Eclipse & Executing with JUnit
« Reply #1 on: April 15, 2012, 05:56:24 PM »
Hi, did you try using TestNG as it has got annotations.
 There is an annotation called 'testName' and if name your test in an
 order it will run it accordingly.
 On Feb 29, 10:09 am, Kumar <youra...@gmail.com> wrote:
 

- Show quoted text -

selenium_freak

  • Web User
Re: Test Cases in Eclipse & Executing with JUnit
« Reply #2 on: April 15, 2012, 05:56:36 PM »
try page objects concept , it will help you drive your test cases in a
 flow , if you are not interested in testng.
 On Feb 29, 3:09 pm, Kumar <youra...@gmail.com> wrote:
 

- Show quoted text -

Selenium Webdriver

Re: Test Cases in Eclipse & Executing with JUnit
« Reply #2 on: April 15, 2012, 05:56:36 PM »

 

Related Topics

  Subject / Started by Replies Last post
1 Replies
457 Views
Last post February 23, 2012, 08:19:32 PM
by Sumit Keswani
1 Replies
482 Views
Last post April 15, 2012, 05:44:47 PM
by Kumar
15 Replies
938 Views
Last post May 01, 2012, 09:35:55 PM
by Sasi kumar
2 Replies
453 Views
Last post May 03, 2012, 11:03:13 PM
by jeevan
2 Replies
269 Views
Last post July 04, 2012, 02:20:51 PM
by Ashutosh
3 Replies
555 Views
Last post July 24, 2012, 09:52:06 PM
by golden_rex
3 Replies
671 Views
Last post July 25, 2012, 02:58:35 PM
by Tarun_K

Review www.seleniumwebdriver.com on alexa.com