diff --git a/src/main/resources/config/Automation_ElevateAPI_QA.properties b/src/main/resources/config/Automation_ElevateAPI_QA.properties index adb7a63..0d93d9a 100644 --- a/src/main/resources/config/Automation_ElevateAPI_QA.properties +++ b/src/main/resources/config/Automation_ElevateAPI_QA.properties @@ -1,3 +1,4 @@ +environment=QA # Elevate project details elevate.qa.api.base.url=https://project-qa.elevate-apis.shikshalokam.org/ elevate.login.endpoint=user/v1/account/login diff --git a/src/test/java/org/shikshalokam/Listerners/SLCustomListener.java b/src/test/java/org/shikshalokam/Listerners/SLCustomListener.java index 9d129c5..d601697 100644 --- a/src/test/java/org/shikshalokam/Listerners/SLCustomListener.java +++ b/src/test/java/org/shikshalokam/Listerners/SLCustomListener.java @@ -32,6 +32,9 @@ public void onStart(ISuite suite) { if (Boolean.parseBoolean(PropertyLoader.PROP_LIST.getProperty("sl.capture.screenshot.on.failure"))) { extent.setSystemInfo("Browser", String.valueOf(PWBrowser)); } + // Load environment property and set it in the Extent report as "ENVIRONMENT" + String environment = PropertyLoader.PROP_LIST.getProperty("environment", "Unknown Environment"); + extent.setSystemInfo("ENVIRONMENT", environment); extent.setSystemInfo("OS", System.getProperty("os.name")); extent.setSystemInfo("OS Version", System.getProperty("os.version")); extent.setSystemInfo("Java Version", System.getProperty("java.version"));