cancel
Showing results for 
Search instead for 
Did you mean: 

Running Junit 3 style of coding with junit-4.8.1.jar is feasible?

monika_b
Champ in-the-making
Champ in-the-making
I need to integrate activiti in existing web application. My Project already has junit-4.8.1.jar included (with which I am not able to get
'JUnit 4 style of coding' working properly(using ActivitiRule etc)). Though I am able to run 'Junit 3 style of coding' (extending ActivitiTestCase) working good with this jar itself.

Q: Can I use Junit 3 style of coding extending ActivitiTestCase with junit-4.8.1.jar ? Or it will leads to some problems later on for complex flows?
I really need good reason why to upgrade to junit-4.11.jar in my existing project as it incorporates more extra testing effort.
<b>Please would someone point ActivitiRule is beneficial compare to ActivitiTestCase?? </b>

Thanks a lot for helping.

Note: I have already posted this question in link http://forums.activiti.org/content/problem-running-simple-junit-junit-4-style
But got lost somewhere in between the conversation. So posted a new one for more clarity.
3 REPLIES 3

monika_b
Champ in-the-making
Champ in-the-making
Just to point from user guide that led me to this confusion:
http://activiti.org/userguide/index.html#apiUnitTesting
"In the JUnit 3 style, the org.activiti.engine.test.ActivitiTestCase must be extended. "
"To get the same functionality when using the JUnit 4 style of writing unit tests, the org.activiti.engine.test.ActivitiRule Rule must be used."

And I am trying to use Junit 3 style with junit-4.8.1.jar to avoid more testing work if i upgrade existing application to junit-4.11.jar.

jbarrez
Star Contributor
Star Contributor
Yes, that works without problems.

As a matter of fact, all Activiti internal tests are still Junit 3 style. There is no impact whatsoever on using 3 or 4 style.

monika_b
Champ in-the-making
Champ in-the-making
Thanks Jbarrez.
I would be using Junit 3 style of junit coding itself.