- Write your JUnit test and jar the classes
- Copy and paste the jar files into jmeter/lib/junit directory
- Start JMeter
- Select Test Plan
- Right click
- Select Thread Group
- Right click
- Enter my unit test in the name
- Enter the package of your JUnit test
- Select the class you want to test
- Select a method to test
- Enter test successful in success message
- Enter 1000 in success code
- Enter test failed in failure message
- Enter 0001 in failure code
- Select the Thread Group
- Right click
Couple of Things
1. JUnit test class should have a default constructor
2. In the Test plan add the jar to the class path
3. Check the JUnit 4 annotations
Hope this helps :)
No comments:
Post a Comment