Skip to content

Instantly share code, notes, and snippets.

Created December 12, 2016 19:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/1f1660280acb41277fbe2c257bab2217 to your computer and use it in GitHub Desktop.
Save anonymous/1f1660280acb41277fbe2c257bab2217 to your computer and use it in GitHub Desktop.
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