On 27/08/2008, lbackstrom <[EMAIL PROTECTED]> wrote:
>
>  I'm trying to use the JUnit capabilities of Jmeter to run performance testing
>  on an application.  I create a JUnit application and extend TestCase as
>  indicated.  I have a "suite" method that adds the real test methods to the
>  TestSuite.  I jar 2 classes up and put the jar file in the indicated
>  directory.
>
>  When I run JMeter it seems to run fine, but it only seems to run the suite
>  method which is only adding the test case to a TestSuite and it doesn't
>  seems to actually run the tests contained in the test suite.  I suspect this
>  because in the actual test class, I can put in 10 second sleeps and the test
>  still completes in a millisecond or less. Here's my code sample - thanks for
>  any help you can offer:
>
>  public class PerformanceTest extends TestCase {
>
>         public static void main(String[] args){
>               junit.textui.TestRunner.run(suite());
>         }
>         public static Test suite() {
>                 TestSuite suite = new TestSuite("Performance Test for logging 
> client...");
>                 suite.addTest(new JUnit4TestAdapter(PerformanceTest2.class));
>
>                 return suite;
>         }
>  }
>
>  public class PerformanceTest2 {
>
>         @Before
>         public void setUp() throws Exception {
>         }
>
>         @Test

JMeter does not support JUnit 4.x which uses annotations.

Annotations require Java 1.5+; JMeter currently supports 1.4+

>         public void assertTest()
>         {
>                 boolean junk = true;
>                 assertTrue(junk);
>         }
>
>  }
>
> --
>  View this message in context: 
> http://www.nabble.com/Using-Junit-capabilities-of-jmeter-tp19182027p19182027.html
>  Sent from the JMeter - User mailing list archive at Nabble.com.
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to