Passing gradle run time properties to Browserstack plugin

51 views
Skip to first unread message

Balaji KM

unread,
Nov 1, 2017, 10:29:10 AM11/1/17
to Geb User Mailing List
Hi,

Currently I am running geb automation pack using custom gradle tasks. 

gradle taskName -Dgeb.env=uat

Inside the tasks, I set the following variable to read the properties.

systemProperty "geb.env", env


Now I am trying to run browserStack tests  and I am calling the task "allBrowserStackTests"..

How can I pass the system properties to browserstack task ?..  

I am using Geb 2.0.0.


Regards,
Balaji


Marcin Erdmann

unread,
Nov 1, 2017, 5:52:14 PM11/1/17
to Geb User Mailing List
Inside of the browserStack {} configuration block provided by the Browser Stack Geb plugin there is a task {} block (see point 7 at http://www.gebish.org/manual/current/#geb-browserstack-plugin). This block configures all test tasks added by the plugin - it delegates to instances of tasks of type Test, which have systemProperty() method, see https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/testing/Test.html#systemProperty(java.lang.String,%20java.lang.Object)

--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+unsubscribe@googlegroups.com.
To post to this group, send email to geb-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/c9ea522a-a72c-48ac-b6ec-66d6dd790faf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Balaji KM

unread,
Nov 6, 2017, 8:20:00 AM11/6/17
to Geb User Mailing List
It worked..Thanks a lot Marcin :)


On Wednesday, 1 November 2017 21:52:14 UTC, Marcin Erdmann wrote:
Inside of the browserStack {} configuration block provided by the Browser Stack Geb plugin there is a task {} block (see point 7 at http://www.gebish.org/manual/current/#geb-browserstack-plugin). This block configures all test tasks added by the plugin - it delegates to instances of tasks of type Test, which have systemProperty() method, see https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/testing/Test.html#systemProperty(java.lang.String,%20java.lang.Object)
On Wed, Nov 1, 2017 at 2:29 PM, Balaji KM <balaj...@gmail.com> wrote:
Hi,

Currently I am running geb automation pack using custom gradle tasks. 

gradle taskName -Dgeb.env=uat

Inside the tasks, I set the following variable to read the properties.

systemProperty "geb.env", env


Now I am trying to run browserStack tests  and I am calling the task "allBrowserStackTests"..

How can I pass the system properties to browserstack task ?..  

I am using Geb 2.0.0.


Regards,
Balaji


--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages