Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions openam-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2011-2016 ForgeRock AS.
* Portions copyright 2017-2025 3A Systems LLC.
* Portions copyright 2017-2026 3A Systems LLC.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
Expand Down Expand Up @@ -104,7 +104,7 @@
<com.sun.identity.configuration.directory>${test.config.path}</com.sun.identity.configuration.directory>
<logback.configurationFile>${basedir}/src/test/resources/logback-test.xml</logback.configurationFile>
<ssoadm.disabled>false</ssoadm.disabled>
<com.iplanet.services.debug.level>message</com.iplanet.services.debug.level>
<com.iplanet.services.debug.level>warning</com.iplanet.services.debug.level>
<com.iplanet.services.debug.directory />
<com.sun.services.debug.mergeall>on</com.sun.services.debug.mergeall>
<XUI.enable>false</XUI.enable>
Expand Down Expand Up @@ -166,13 +166,13 @@
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.13.0</version>
<version>4.43.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>1.20.6</version>
<version>2.0.4</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,31 @@
* Header, with the fields enclosed by brackets [] replaced by your own identifying
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2025 3A Systems LLC.
* Copyright 2025-2026 3A Systems LLC.
*/

package org.openidentityplatform.openam.test.integration;

import org.apache.commons.io.FileUtils;
import org.openqa.selenium.By;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.StaleElementReferenceException;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.io.FileHandler;
import org.openqa.selenium.support.ui.ExpectedCondition;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.testcontainers.shaded.org.apache.commons.io.FileUtils;
import org.testng.ITestResult;
import org.testng.annotations.AfterClass;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.nio.file.Path;
Expand All @@ -48,8 +53,9 @@ public abstract class BaseTest {
@BeforeClass
public void webdriverSetup() {
ChromeOptions options = new ChromeOptions();
options.addArguments("--remote-allow-origins=*","--headless", "--disable-dev-shm-usage", "--no-sandbox", "--verbose");
//options.addArguments("--remote-allow-origins=*", "--verbose");
options.addArguments("--remote-allow-origins=*","--headless", "--disable-dev-shm-usage", "--no-sandbox",
"--verbose", "--window-size=1920,1080", "--guest");
// options.addArguments("--remote-allow-origins=*", "--verbose", "--guest");
driver = new ChromeDriver(options);
wait = new WebDriverWait(driver, Duration.ofSeconds(10));
}
Expand All @@ -71,6 +77,15 @@ public void cleanup() throws IOException {
}
}

//@AfterMethod //uncomment to debug
public void tearDown(ITestResult result) throws IOException {
if (result.getStatus() == ITestResult.FAILURE) {
WebElement element = driver.findElement(By.tagName("html"));
File source = element.getScreenshotAs(OutputType.FILE);
FileHandler.copy(source, new File("/tmp/element_screenshot.png"));
}
}

protected void printInstallLogFile() {
String testConfigPath = System.getProperty("test.config.path");
Path installLog = Paths.get(testConfigPath, "install.log");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Header, with the fields enclosed by brackets [] replaced by your own identifying
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2025 3A Systems LLC.
* Copyright 2025-2026 3A Systems LLC.
*/

package org.openidentityplatform.openam.test.integration;
Expand Down Expand Up @@ -115,11 +115,16 @@ private void testOpenAmInstallation(String openamUrl, Integer opendjPort) throws

wait.until(ExpectedConditions.elementToBeClickable(By.id("nextTabButton"))).click();

waitForElement(By.id("loadBalancerDisable"));
waitForElementVisible(By.id("loadBalancerDisable"));
waitForElementVisible(By.id("loadBalancerHostName"));

Thread.sleep(1000);

wait.until(ExpectedConditions.elementToBeClickable(By.id("nextTabButton"))).click();

waitForElement(By.id("agentPassword")).sendKeys(PA_PASSWORD);
waitForElement(By.id("agentConfirm")).sendKeys(PA_PASSWORD);

wait.until(ExpectedConditions.elementToBeClickable(By.id("nextTabButton"))).click();


Expand Down
2 changes: 1 addition & 1 deletion openam-server/src/test/resources/logback-test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</layout>
</appender>

<root level="TRACE">
<root level="WARN">
<appender-ref ref="STDOUT" />
</root>

Expand Down