What is use of @Shared annotation in Serenity?

Alakh Gupta
Alakh Gupta

Posted On: Apr 03, 2020

 

The @Shared annotation is used to share objects between the steps and tasks in the test. It acts as a shortcut for @Steps(shared=true) and comes as handy in Screenplay tests. Here, the @Shared annotation reflects the intention more accurately than the @Steps annotation.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Serenity framework Interview Questions

    What is Serenity Java?

    Serenity is a Java-based library for test automation. It also wraps and extends WebDriver and JUnit functionality. It is an open-source modular framework that wraps around BDD style tools like Cucumbe...

    Serenity framework Interview Questions

    Explain Serenity in selenium?

    Serenity is an open-source library that lets you write cleaner and maintainable tests faster. It provides support for automated web tests using Selenium2. It helps you produce narrative reports about ...

    Serenity framework Interview Questions

    List some prerequisites for installing Serenity?

    The prerequisite for installing Serenity is,Java SDK (Software Development Kit) Eclipse IDE Selenium Driver files ...