Hi Marcin,
sorry for my newbie question.
The project properties you mentioned is where/ which file? I put it to
build.gradle but the if condition is not accepted.
Thanks!
Am Samstag, 20. Februar 2016 19:45:18 UTC+1 schrieb Marcin Erdmann:
>
> To pass the baseUrl from command line when invoking gradle you need to set
> the system property on the test task because the system properties set for
> the build are not by default passed to the jvm running the tests. In your
> gradle build script you need to add:
>
> test {
> systemProperties("geb.build.baseUrl":
> System.getProperty("geb.build.baseUrl"))
> }
>
> You can also use project properties instead of system properties when
> passing the build url from the command line to save yourself some typing:
>
> test {
> if (project.hasProperty("baseUrl") {
> systemProperties("geb.build.baseUrl": project.baseUrl)
> }
> }
>
> and:
>
> ./gradlew -PbaseUrl="https://dev-admin.domain.info" test
>
>
> To run a single test you can use the --tests switch (
> https://docs.gradle.org/current/userguide/java_plugin.html#test_filtering
> ):
>
> ./gradlew test --tests="*LoginSpec"
>
> On Thu, Feb 18, 2016 at 2:27 PM, Geemang <[email protected]
> <javascript:>> wrote:
>
>> I'm attempting to do: ./gradlew -Dgeb.build.baseUrl=
>> https://dev-admin.domain.info -Dtest.single=LoginSpec test
>>
>>
>> LoginSpec > can get to the login page FAILED
>> geb.error.NoBaseUrlDefinedException at LoginSpec.groovy:21
>>
>>
>> 2 Questions:
>>
>> 1) Is it possible to pass the baseUrl using gradle?
>> 2) How do you target a specific test?
>>
>> TIA,
>> Geemang
>>
>> --
>> 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 [email protected] <javascript:>.
>> To post to this group, send email to [email protected]
>> <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/geb-user/43f44d99-8921-44a8-8dce-3ceabfbc94e3%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/geb-user/43f44d99-8921-44a8-8dce-3ceabfbc94e3%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/geb-user/e42f97dc-7a1d-4e37-88cc-eeeebfc55cb1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.