A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Junit Execution order
Joined: Dec 09, 2010
Mar 14, 2011 05:46:09
I have few classes where i have
When i execute the
cases in this class individually it executed properly in the order of occurence,
However when i put it in a test suite. The testcases are executed in a different order which has cascading effect and my test suite result is affected.
I am using junit 4.6 in eclipse environment.
Could anybody please help me out in sorting this .
Thanks in advance
Joined: Apr 14, 2004
Mar 14, 2011 06:19:50
I don't think there is anything in JUnit to tell a runner to order tests (I may be wrong, but there certainly never used to be). The usual
Which is why JUnit supplied the @Before and @After annotations. If you really need to control the ordering of test cases you'll need to define these in a test suite.
subject: Junit Execution order
How to test a Web Application using JUNIT ???
Lazy Initialization Exception while running my Junit Test Cases
using Test suite
Run as Junit Test case
Ant - the junit task: can load TestCases from jar ?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014