CodeSVby CA Technologies

Upload definitions to Blazemeter Mock Services

< Back

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 */
 }
}