Skip to content

Upload definitions to Blazemeter Mock Services

Lokesh Mathur edited this page Aug 13, 2019 · 1 revision

From release 2.0.0, CodeSV provides functionality for uploading endpoint definitions from code into Blazemeter Mock Services.

Usage

@TransactionCloudRepository(
		workspaces = {"Default Workspace"},
		apiKey = "...",
		apiSecret = "...",
		uri = "https://mock.blazemeter.com"
)
public class CodeSVUploadExampleTest {

	@Rule
	public VirtualServerRule virtualServerRule = new VirtualServerRule();

	private TxnRepoStore store = new TxnRepoStoreBuilder()
			.uploadDslToTransactionRepository("Default Workspace", "Default Service").build(this);

	@Test
	public void codesvEUploadExampleTest() {
		forGet("http://blazedemo.com/cities")
			.doReturn(okMessage().withJsonBody("...cities..."));
				
		/* rest of the test */
	}
}