コード例 #1
0
 @Test
 public void activeTests() {
   String expActiveTests =
       bmUrlManager.getServerUrl()
           + "/api/latest/web/active?api_key="
           + userKey
           + "&app_key="
           + appKey
           + UrlManager.CLIENT_IDENTIFICATION;
   String actActiveTests = bmUrlManager.activeTests(appKey, userKey);
   Assert.assertEquals(expActiveTests, actActiveTests);
 }
コード例 #2
0
 @Test
 public void createTest() {
   String expCreateTest =
       bmUrlManager.getServerUrl()
           + "/api/latest/tests/custom?custom_test_type=yahoo&api_key="
           + userKey
           + "&app_key="
           + appKey
           + UrlManager.CLIENT_IDENTIFICATION;
   String actCreateTest = bmUrlManager.createTest(appKey, userKey);
   Assert.assertEquals(expCreateTest, actCreateTest);
 }
コード例 #3
0
 @Test
 public void getUser() {
   String expGetUser =
       bmUrlManager.getServerUrl()
           + "/api/latest/user?api_key="
           + userKey
           + "&app_key="
           + appKey
           + UrlManager.CLIENT_IDENTIFICATION;
   String actGetUser = bmUrlManager.getUser(appKey, userKey);
   Assert.assertEquals(expGetUser, actGetUser);
 }
コード例 #4
0
 @Test
 public void getTests() {
   String expGetTestsUrl =
       bmUrlManager.getServerUrl()
           + "/api/web/tests?api_key="
           + userKey
           + "&app_key="
           + appKey
           + UrlManager.CLIENT_IDENTIFICATION;
   String actGetTestsUrl = bmUrlManager.tests(appKey, userKey);
   Assert.assertEquals(expGetTestsUrl, actGetTestsUrl);
 }
コード例 #5
0
 @Test
 public void generatePublicToken_masters() {
   String expGenPublicToken =
       bmUrlManager.getServerUrl()
           + "/api/latest/masters/"
           + masterId
           + "/publicToken?api_key="
           + userKey
           + "&app_key="
           + appKey
           + UrlManager.CLIENT_IDENTIFICATION;
   String actGenPublicToken = bmUrlManager.generatePublicToken(appKey, userKey, masterId);
   Assert.assertEquals(expGenPublicToken, actGenPublicToken);
 }
コード例 #6
0
 @Test
 public void retrieveJUNITXML() {
   String expRetrieveJUNITXML =
       bmUrlManager.getServerUrl()
           + "/api/latest/masters/"
           + masterId
           + "/reports/thresholds?format=junit&api_key="
           + userKey
           + "&app_key="
           + appKey
           + UrlManager.CLIENT_IDENTIFICATION;
   String actRetrieveJUNITXML = bmUrlManager.retrieveJUNITXML(appKey, userKey, masterId);
   Assert.assertEquals(expRetrieveJUNITXML, actRetrieveJUNITXML);
 }
コード例 #7
0
 @Test
 public void postJsonConfig() {
   String expPutTestInfo =
       bmUrlManager.getServerUrl()
           + "/api/latest/tests/"
           + testId
           + "/custom?custom_test_type=yahoo&api_key="
           + userKey
           + "&app_key="
           + appKey
           + UrlManager.CLIENT_IDENTIFICATION;
   String actPutTestInfo = bmUrlManager.postJsonConfig(appKey, userKey, testId);
   Assert.assertEquals(expPutTestInfo, actPutTestInfo);
 }
コード例 #8
0
 @Test
 public void getTestInfo() {
   String expGetTestInfo =
       bmUrlManager.getServerUrl()
           + "/api/latest/tests/"
           + testId
           + "?api_key="
           + userKey
           + "&app_key="
           + appKey
           + UrlManager.CLIENT_IDENTIFICATION;
   String actGetTestInfo = bmUrlManager.getTestConfig(appKey, userKey, testId);
   Assert.assertEquals(expGetTestInfo, actGetTestInfo);
 }
コード例 #9
0
 @Test
 public void getCIStatus() {
   String expCIStatus =
       bmUrlManager.getServerUrl()
           + "/api/latest/masters/"
           + masterId
           + "/ci-status?api_key="
           + userKey
           + "&app_key="
           + appKey
           + UrlManager.CLIENT_IDENTIFICATION;
   String actCIStatus = bmUrlManager.ciStatus(appKey, userKey, masterId);
   Assert.assertEquals(expCIStatus, actCIStatus);
 }
コード例 #10
0
 @Test
 public void listOfSessions() {
   String expListOfSessionIds =
       bmUrlManager.getServerUrl()
           + "/api/latest/masters/"
           + masterId
           + "/sessions?api_key="
           + userKey
           + "&app_key="
           + appKey
           + UrlManager.CLIENT_IDENTIFICATION;
   String actListOfSessionsIds = bmUrlManager.listOfSessionIds(appKey, userKey, masterId);
   Assert.assertEquals(expListOfSessionIds, actListOfSessionsIds);
 }
コード例 #11
0
 @Test
 public void testReport() {
   String expTestReport =
       bmUrlManager.getServerUrl()
           + "/api/latest/masters/"
           + masterId
           + "/reports/main/summary?api_key="
           + userKey
           + "&app_key="
           + appKey
           + UrlManager.CLIENT_IDENTIFICATION;
   String actTestReport = bmUrlManager.testReport(appKey, userKey, masterId);
   Assert.assertEquals(expTestReport, actTestReport);
 }
コード例 #12
0
 @Test
 public void testStatus() {
   String expTestGetStatus =
       bmUrlManager.getServerUrl()
           + "/api/latest/masters/"
           + masterId
           + "/status?events=false&api_key="
           + userKey
           + "&app_key="
           + appKey
           + UrlManager.CLIENT_IDENTIFICATION;
   String actTestGetStatus = bmUrlManager.masterStatus(appKey, userKey, masterId);
   Assert.assertEquals(expTestGetStatus, actTestGetStatus);
 }
コード例 #13
0
  @Test
  public void testTerminate_masters() {
    String expTestTerminate =
        bmUrlManager.getServerUrl()
            + "/api/latest/masters/"
            + testId
            + "/terminate?api_key="
            + userKey
            + "&app_key="
            + appKey
            + UrlManager.CLIENT_IDENTIFICATION;

    String actTestTerminate = bmUrlManager.testTerminate(appKey, userKey, testId);
    Assert.assertEquals(expTestTerminate, actTestTerminate);
  }
コード例 #14
0
  @Test
  public void testStop_masters() {
    String expTestStop =
        bmUrlManager.getServerUrl()
            + "/api/latest/masters/"
            + testId
            + "/stop?api_key="
            + userKey
            + "&app_key="
            + appKey
            + UrlManager.CLIENT_IDENTIFICATION;

    String actTestStop = bmUrlManager.masterStop(appKey, userKey, testId);
    Assert.assertEquals(expTestStop, actTestStop);
  }
コード例 #15
0
 @Test
 public void properties() {
   String expProperties =
       bmUrlManager.getServerUrl()
           + UrlManager.LATEST
           + "/sessions/"
           + sessionId
           + "/properties?target=all&api_key="
           + userKey
           + "&app_key="
           + appKey
           + UrlManager.CLIENT_IDENTIFICATION;
   ;
   String actProperties = bmUrlManager.properties(appKey, userKey, sessionId);
   Assert.assertEquals(expProperties, actProperties);
 }
コード例 #16
0
 @Test
 public void fileUpload() {
   String expFileLoad = Constants.NOT_IMPLEMENTED;
   String actFileLoad = bmUrlManager.scriptUpload(appKey, userKey, testId, fileName);
   Assert.assertEquals(expFileLoad, actFileLoad);
 }
コード例 #17
0
 @Test
 public void setServerUrl() {
   bmUrlManager.setServerUrl(TestConstants.mockedApiUrl);
   Assert.assertTrue(bmUrlManager.getServerUrl().equals(TestConstants.mockedApiUrl));
 }