Skip to content

Instantly share code, notes, and snippets.

/ChangScene.java

Created Dec 12, 2016
Embed
What would you like to do?
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
You can’t perform that action at this time.