-
-
Notifications
You must be signed in to change notification settings - Fork 523
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored some unit tests to check the fix for the Saucelinks link p…
…roblem properly
- Loading branch information
Showing
2 changed files
with
28 additions
and
7 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
serenity-core/src/test/groovy/net/serenitybdd/core/model/WhenRecordingTestOutcomes.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package net.serenitybdd.core.model | ||
import net.thucydides.core.model.TestOutcome | ||
import net.thucydides.core.util.MockEnvironmentVariables | ||
import spock.lang.Specification | ||
|
||
class WhenRecordingTestOutcomes extends Specification{ | ||
|
||
class SomeTestScenario { | ||
|
||
} | ||
|
||
def "should be able to obtain a link to the saucelabs video"() { | ||
|
||
given: | ||
def environmentVariables = new MockEnvironmentVariables(); | ||
environmentVariables.setProperty("saucelabs.url","http://username:accesskey@ondemand.saucelabs.com:80/wd/hub"); | ||
and: | ||
def testOutcome = TestOutcome.forTest("should_do_this", SomeTestScenario.class); | ||
testOutcome.setEnvironmentVariables(environmentVariables); | ||
testOutcome.linkGenerator.environmentVariables = environmentVariables | ||
when: | ||
testOutcome.setSessionId("1234"); | ||
then: | ||
testOutcome.getVideoLink() == "http://saucelabs.com/jobs/1234" | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters