jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: Before method of junit rule is not being called.
Date Fri, 05 Jul 2013 12:57:07 GMT
On 5 July 2013 11:54, Ajaykumar Vasireddy <ajaykumar.vasireddy@agfa.com> 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: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Mime
View raw message