https://issues.apache.org/bugzilla/show_bug.cgi?id=47888

           Summary: JUnit Sampler re-uses test object
           Product: JMeter
           Version: unspecified
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
        AssignedTo: [email protected]
        ReportedBy: [email protected]


The JUnit sampler currently re-uses the same test object for each sample.

This is not how JUnit tests work, as the test runner creates a new instance of
the test class for each test.

Re-using the instance means that tests such as the following contrived example
will fail if a sampler is run more than once in a loop:

    private int i = 123;
    public void testRerun(){
        assertEquals(123,i);
        i++;
    }

The sampler needs to recreate the test instance for each sample.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to