any other suggestions to execute the Junit @Rule in Jmeter? Kind Regards,
Ajaykumar Vasireddy | Agfa HealthCare Developer Process Planning | HE/Clinical Research Solutions T +49 651 8247 585 | F +49 651 8247 100 Agfa HealthCare GmbH, Monaiser Straße 11, 54294 Trier, Germany http://www.agfahealthcare.com http://blog.agfahealthcare.com Geschäftsführer: Winfried Post (Vorsitzender), Michael Strüter, Dieter Nels | Sitz der Gesellschaft: Bonn, Amtsgericht Bonn, HRB-Nr. 9069 | Ust.-IDNr. DE 172711289 Click on link to read important disclaimer: http://www.agfahealthcare.com/maildisclaimer Von: sebb <[email protected]> An: JMeter Users List <[email protected]> Datum: 05.07.2013 14:57 Betreff: Re: Before method of junit rule is not being called. On 5 July 2013 11:54, Ajaykumar Vasireddy <[email protected]> wrote: > Hi, > > when using the JMeter for running Junit tests, the annotation @Rule is not > working.The before method that is declared in the Rule class is not being > called. > > For Example: > > @Rule > public TestHelper testtHelper = new TestHelper(); // Initialiazation > of many required classes are done here. > > The above rule is being used in the test class. > > And the rule itself is as follows: > > public class TestHelper extends ExternalResource { > > @Override > protected void before() throws Throwable { > itHelper = new IntegrationTestHelper(); > } > > @Override > protected void after() { > try { > itHelper.tearDownAfterClass(); > } catch (Exception e) { > e.printStackTrace(); > } > } > > Any hints why the @Rule annotation is not working and the before methods > are not being called. I don't think the JUnit sampler supports @Rule. > Thanking you. > > Kind Regards, > > Ajaykumar Vasireddy | Agfa HealthCare > Developer Process Planning | HE/Clinical Research Solutions > T +49 651 8247 585 | F +49 651 8247 100 > > Agfa HealthCare GmbH, Monaiser Straße 11, 54294 Trier, Germany > http://www.agfahealthcare.com > http://blog.agfahealthcare.com > Geschäftsführer: Winfried Post (Vorsitzender), Michael Strüter, Dieter > Nels | Sitz der Gesellschaft: Bonn, Amtsgericht Bonn, HRB-Nr. 9069 | > Ust.-IDNr. DE 172711289 > Click on link to read important disclaimer: > http://www.agfahealthcare.com/maildisclaimer --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
