Created
December 12, 2016 19:57
-
-
Save anonymous/1f1660280acb41277fbe2c257bab2217 to your computer and use it in GitHub Desktop.
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
SceneConfiguration sceneConfiguration = new SceneConfiguration(rootPath1, sceneMode, sceneName1); | |
try (FlashbackRunner flashbackRunner = new FlashbackRunner.Builder().mode(sceneMode).host(host).port(port).sceneAccessLayer( | |
new SceneAccessLayer(SceneFactory.create(sceneConfiguration), matchRule)).build()) { | |
flashbackRunner.start(); | |
//make http request call | |
sceneConfiguration = new SceneConfiguration(rootPath2, sceneMode, sceneName2); | |
flashbackRunner.setScene(SceneFactory.create(sceneConfiguration)); | |
//make http request call again. | |
sceneConfiguration = new SceneConfiguration(rootPath3, sceneMode, sceneName3); | |
flashbackRunner.setScene(SceneFactory.create(sceneConfiguration)); | |
} | |
//In record mode, after recording is done, the same Http transaction will be stored in multiple files(in our case, we will get 3 files): | |
//rootPath1/scene1, rootPath2/scene2 and rootPath3/scene3 | |
//In replay mode, the response will be coming from those multiple different files(3 files in our case). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment