User's Blog!by CA Technologies

Upload definitions to Blazemeter Mock Services

How Can We Help?
< 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 */
 }
}

 

Previous Export definitions as file
Next Refer to Blazemeter Mock Services transactions from code
Table of Contents

Comments are currently closed.