Skip to content

Commit

Permalink
Update Test framework with profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
AnuGayan committed Mar 6, 2024
1 parent 6c35227 commit f4bd2f5
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 11 deletions.
43 changes: 37 additions & 6 deletions modules/integration/tests-integration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,41 @@ under the License.
<artifactId>org.wso2.carbon.am.integration.test</artifactId>
<packaging>pom</packaging>

<modules>
<!--module>tests-benchmark</module-->
<module>tests-backend</module>
<!--module>tests-restart</module-->
<!--module>tests-config</module-->
</modules>
<profiles>
<profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<modules>
<module>tests-benchmark</module>
<module>tests-backend</module>
<module>tests-restart</module>
</modules>
</profile>
<profile>
<id>without-restart</id>
<modules>
<module>tests-backend</module>
</modules>
</profile>
<profile>
<id>benchmark-restart</id>
<modules>
<module>tests-benchmark</module>
<module>tests-restart</module>
</modules>
</profile>
<profile>
<id>benchmark-test</id>
<modules>
<module>tests-benchmark</module>
</modules>
</profile>
<profile>
<id>skip-test</id>
<modules>
</modules>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,10 @@ public void configureServer() throws AutomationFrameworkException {
WebAppDeploymentUtil.copyWebApp(relativeResourcePath + File.separator + "war" + File.separator
+ APIMIntegrationConstants.JAXRS_BASIC_WEB_APP_NAME + ".war",
webappsPath + APIMIntegrationConstants.JAXRS_BASIC_WEB_APP_NAME);
WebAppDeploymentUtil.waitForWebappToDeploy(
webappsPath + APIMIntegrationConstants.JAXRS_BASIC_WEB_APP_NAME + ".war", 120000L);

WebAppDeploymentUtil.copyWebApp(relativeResourcePath + File.separator + "war" + File.separator
+ APIMIntegrationConstants.AM_MONITORING_WEB_APP_NAME + ".war",
webappsPath + APIMIntegrationConstants.AM_MONITORING_WEB_APP_NAME);
WebAppDeploymentUtil.waitForWebappToDeploy(
webappsPath + APIMIntegrationConstants.AM_MONITORING_WEB_APP_NAME + ".war", 120000L);

log.info("Web Apps Deployed");
} catch (IOException e) {
Expand Down
5 changes: 5 additions & 0 deletions modules/integration/tests-integration/tests-restart/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,11 @@ under the License.
<artifactId>xmlunit-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.minidev</groupId>
<artifactId>json-smart</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.xmlunit</groupId>
<artifactId>xmlunit-matchers</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ public void setEnvironment(ITestContext ctx) throws Exception {
HttpResponse apiLoggingLoggingResponse = HTTPSClientUtils.doGet(getStoreURLHttps()
+ "api/am/devops/v0/tenant-logs/carbon.super/apis?log-level=full", apiLoggingHeader);
Assert.assertEquals(apiLoggingLoggingResponse.getData(), "{\"apis\":[{\"context\":\"/" + "apiloggingtest" + "/" + "1.0.0" + "\","
+ "\"logLevel\":\"FULL\",\"apiId\":\"" + apiLoggingApiId + "\"}]}");
+ "\"logLevel\":\"FULL\",\"apiId\":\"" + apiLoggingApiId + "\",\"resourceMethod\":null,\"resourcePath\":null}]}");

ctx.setAttribute("apiLoggingApplicationId", apiLoggingApplicationId);
/*
Expand Down

0 comments on commit f4bd2f5

Please sign in to comment.