@Test(groups = "wso2.as", description = "Uploading the web app which use spring", enabled = false) public void uploadSpringWebApplicationTest() throws Exception { String filePath = TestConfigurationProvider.getResourceLocation("AS") + File.separator + "war" + File.separator + "spring" + File.separator + "booking-faces.war"; WebAppUploadingPage uploadPage = new WebAppUploadingPage(driver); Assert.assertTrue(uploadPage.uploadWebApp(filePath), "Web Application uploading failed"); }
@Test(groups = "wso2.am", description = "Login to api manager as user2") public void testListServices() throws Exception { JMeterTest script = new JMeterTest( new File( TestConfigurationProvider.getResourceLocation() + File.separator + "artifacts" + File.separator + "AM" + File.separator + "scripts" + File.separator + "API_Manager_Login_Test.jmx")); JMeterTestManager manager = new JMeterTestManager(); manager.runTest(script); }
@BeforeClass(alwaysRun = true) public void initialize() throws APIManagerIntegrationTestException, XPathExpressionException, RemoteException, ResourceAdminServiceExceptionException, MalformedURLException { super.init(); apiEndPointUrl = getGatewayURLHttp() + API_END_POINT_POSTFIX_URL; providerName = user.getUserName(); apiCreationRequestBean = new APICreationRequestBean( API_NAME, API_CONTEXT, API_VERSION_1_0_0, providerName, new URL(apiEndPointUrl)); apiCreationRequestBean.setTags(API_TAGS); apiCreationRequestBean.setDescription(API_DESCRIPTION); String publisherURLHttp = getPublisherURLHttp(); String storeURLHttp = getStoreURLHttp(); apiPublisherClientUser1 = new APIPublisherRestClient(publisherURLHttp); APIStoreRestClient apiStoreClientUser1 = new APIStoreRestClient(storeURLHttp); // Login to API Publisher with admin apiPublisherClientUser1.login(user.getUserName(), user.getPassword()); // Login to API Store with admin apiStoreClientUser1.login(user.getUserName(), user.getPassword()); apiIdentifier = new APIIdentifier(providerName, API_NAME, API_VERSION_1_0_0); String artifactsLocation = TestConfigurationProvider.getResourceLocation() + File.separator + "artifacts" + File.separator + "AM" + File.separator + "lifecycletest" + File.separator + "tiers.xml"; resourceAdminServiceClient = new ResourceAdminServiceClient( publisherContext.getContextUrls().getBackEndUrl(), createSession(publisherContext)); originalTiersXML = resourceAdminServiceClient.getTextContent(TIER_XML_REG_CONFIG_LOCATION); newTiersXML = readFile(artifactsLocation); }