serenity-bdd / serenity-documentation

The main Serenity BDD documentation
Apache License 2.0
41 stars 61 forks source link

Need info about passing command line custome argument/s #97

Open vikramvi opened 8 years ago

vikramvi commented 8 years ago

Hi,

Can we please mention a section about passing command line custom arguments and accessing same from code ?

e.g. user id and password

mvn clean verify -Dtest.email="test@yahoo.com" -Dtest.password="$pass$"

System.out.println(System.getProperty("test.email")); System.out.println(System.getProperty("test.password"));

Thanks & Regards, Vikram

globalworming commented 4 years ago

see https://serenity-bdd.github.io/theserenitybook/latest/environment-specific-config.html you can access environment variables with the environment variables class