Skip to content

Commit

Permalink
Release XLT 8.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jowerner committed Nov 21, 2024
2 parents 616b5af + ecb1716 commit 171855f
Show file tree
Hide file tree
Showing 7 changed files with 328 additions and 114 deletions.
8 changes: 8 additions & 0 deletions config/xsl/loadreport/sections/response-codes.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@
</xsl:choose>
</table>
</div>
<div class="charts">
<div class="chart">
<img>
<xsl:attribute name="src">charts/ResponseCodesPerSecond.webp</xsl:attribute>
<xsl:attribute name="alt">Response Codes Per Second</xsl:attribute>
</img>
</div>
</div>
</div>
</div>

Expand Down
39 changes: 13 additions & 26 deletions doc/internal-doc/api.sig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Signature file v4.1
#Version 8.0.0
#Version 8.5.0

CLSS public abstract com.xceptance.xlt.api.actions.AbstractAction
cons protected init(com.xceptance.xlt.api.actions.AbstractAction,java.lang.String)
Expand Down Expand Up @@ -2349,6 +2349,12 @@ meth public static <%0 extends java.lang.Object> java.util.List<{%%0}> of({%%0},
meth public void replaceAll(java.util.function.UnaryOperator<{java.util.List%0}>)
meth public void sort(java.util.Comparator<? super {java.util.List%0}>)

CLSS public abstract interface !annotation org.jspecify.annotations.NullMarked
anno 0 java.lang.annotation.Documented()
anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME)
anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[MODULE, PACKAGE, TYPE, METHOD, CONSTRUCTOR])
intf java.lang.annotation.Annotation

CLSS public abstract interface !annotation org.junit.runner.RunWith
anno 0 java.lang.annotation.Inherited()
anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME)
Expand Down Expand Up @@ -2376,43 +2382,21 @@ meth public abstract void downloadFile(java.lang.String,java.nio.file.Path) thro
meth public void requireDownloadsEnabled(org.openqa.selenium.Capabilities)

CLSS public abstract interface org.openqa.selenium.JavascriptExecutor
meth public !varargs java.lang.Object executeScript(org.openqa.selenium.ScriptKey,java.lang.Object[])
meth public abstract !varargs java.lang.Object executeAsyncScript(java.lang.String,java.lang.Object[])
meth public abstract !varargs java.lang.Object executeScript(java.lang.String,java.lang.Object[])
meth public java.util.Set<org.openqa.selenium.ScriptKey> getPinnedScripts()
meth public org.openqa.selenium.ScriptKey pin(java.lang.String)
meth public void unpin(org.openqa.selenium.ScriptKey)

CLSS public abstract interface org.openqa.selenium.PrintsPage
meth public abstract org.openqa.selenium.Pdf print(org.openqa.selenium.print.PrintOptions)

CLSS public abstract interface org.openqa.selenium.SearchContext
anno 0 org.jspecify.annotations.NullMarked()
meth public abstract java.util.List<org.openqa.selenium.WebElement> findElements(org.openqa.selenium.By)
meth public abstract org.openqa.selenium.WebElement findElement(org.openqa.selenium.By)

CLSS public abstract interface org.openqa.selenium.TakesScreenshot
anno 0 org.jspecify.annotations.NullMarked()
meth public abstract <%0 extends java.lang.Object> {%%0} getScreenshotAs(org.openqa.selenium.OutputType<{%%0}>)

CLSS public abstract interface org.openqa.selenium.WebDriver
innr public abstract interface static Navigation
innr public abstract interface static Options
innr public abstract interface static TargetLocator
innr public abstract interface static Timeouts
innr public abstract interface static Window
intf org.openqa.selenium.SearchContext
meth public abstract java.lang.String getCurrentUrl()
meth public abstract java.lang.String getPageSource()
meth public abstract java.lang.String getTitle()
meth public abstract java.lang.String getWindowHandle()
meth public abstract java.util.List<org.openqa.selenium.WebElement> findElements(org.openqa.selenium.By)
meth public abstract java.util.Set<java.lang.String> getWindowHandles()
meth public abstract org.openqa.selenium.WebDriver$Navigation navigate()
meth public abstract org.openqa.selenium.WebDriver$Options manage()
meth public abstract org.openqa.selenium.WebDriver$TargetLocator switchTo()
meth public abstract org.openqa.selenium.WebElement findElement(org.openqa.selenium.By)
meth public abstract void close()
meth public abstract void get(java.lang.String)
meth public abstract void quit()

CLSS public abstract interface org.openqa.selenium.bidi.HasBiDi
meth public abstract java.util.Optional<org.openqa.selenium.bidi.BiDi> maybeGetBiDi()
Expand Down Expand Up @@ -2609,6 +2593,7 @@ cons public init(java.net.URL,org.openqa.selenium.Capabilities,boolean)
cons public init(org.openqa.selenium.Capabilities)
cons public init(org.openqa.selenium.Capabilities,boolean)
cons public init(org.openqa.selenium.remote.CommandExecutor,org.openqa.selenium.Capabilities)
fld protected org.openqa.selenium.Capabilities capabilities
innr protected RemoteTargetLocator
innr protected RemoteWebDriverOptions
innr public final static !enum When
Expand Down Expand Up @@ -2654,6 +2639,8 @@ meth public org.openqa.selenium.federatedcredentialmanagement.FederatedCredentia
meth public org.openqa.selenium.remote.CommandExecutor getCommandExecutor()
meth public org.openqa.selenium.remote.ErrorHandler getErrorHandler()
meth public org.openqa.selenium.remote.FileDetector getFileDetector()
meth public org.openqa.selenium.remote.Network network()
meth public org.openqa.selenium.remote.Script script()
meth public org.openqa.selenium.remote.SessionId getSessionId()
meth public org.openqa.selenium.virtualauthenticator.VirtualAuthenticator addVirtualAuthenticator(org.openqa.selenium.virtualauthenticator.VirtualAuthenticatorOptions)
meth public static org.openqa.selenium.remote.RemoteWebDriverBuilder builder()
Expand All @@ -2672,7 +2659,7 @@ meth public void setErrorHandler(org.openqa.selenium.remote.ErrorHandler)
meth public void setFileDetector(org.openqa.selenium.remote.FileDetector)
meth public void setLogLevel(java.util.logging.Level)
supr java.lang.Object
hfds LOG,capabilities,converter,elementLocation,errorHandler,executeMethod,executor,fileDetector,level,localLogs,remoteLogs,sessionId
hfds LOG,WEBDRIVER_REMOTE_ENABLE_TRACING,converter,elementLocation,errorHandler,executeMethod,executor,fileDetector,level,localLogs,remoteLogs,remoteNetwork,remoteScript,sessionId
hcls RemoteAlert,RemoteNavigation,RemoteVirtualAuthenticator

CLSS public abstract interface org.openqa.selenium.virtualauthenticator.HasVirtualAuthenticator
Expand Down
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.xceptance</groupId>
<artifactId>xlt</artifactId>
<version>8.4.1</version>
<version>8.5.0</version>
<packaging>jar</packaging>

<name>XLT</name>
Expand Down Expand Up @@ -71,9 +71,9 @@
<jetty.version>9.4.53.v20231009</jetty.version>
<log4j.version>2.22.1</log4j.version>
<powermock.version>2.0.9</powermock.version>
<selenium.version>4.17.0</selenium.version>
<selenium.version>4.26.0</selenium.version>
<htmlunitdriver.version>4.17.0</htmlunitdriver.version>
<otel.version>1.40.0</otel.version>
<otel.version>1.43.0</otel.version>
<copyright>Copyright (c) ${project.inceptionYear}-2024 ${project.organization.name}</copyright>
</properties>

Expand Down Expand Up @@ -402,13 +402,13 @@
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
<version>1.14.11</version>
<version>1.15.7</version>
</dependency>
<!-- guava is used by Selenium, Google Compute and Checkstyle. Ensure that the highest version wins. -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>33.0.0-jre</version>
<version>33.3.1-jre</version>
</dependency>
<!-- slf4j is used by many libs. Ensure that the version used by log4j-slf4j2-impl wins. -->
<dependency>
Expand Down
159 changes: 98 additions & 61 deletions src/main/java/com/xceptance/xlt/engine/XltWebClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -314,38 +314,9 @@ public XltWebClient(final BrowserVersion browserVersion, final boolean javaScrip
cssMode = CssMode.getMode(props.getProperty("com.xceptance.xlt.css.download.images"));

// JavaScript
if (javaScriptEngineEnabled)
{
// setup JavaScript engine
int optimizationLevel = props.getProperty("com.xceptance.xlt.js.compiler.optimizationLevel", -1);
if (optimizationLevel < -1 || optimizationLevel > 9)
{
XltLogger.runTimeLogger.warn("Property 'com.xceptance.xlt.js.compiler.optimizationLevel' is set to an invalid value. Will use -1 instead.");
optimizationLevel = -1;
}

final boolean takeMeasurements = props.getProperty("com.xceptance.xlt.js.takeMeasurements", false);

setJavaScriptEngine(new XltJavaScriptEngine(this, optimizationLevel, takeMeasurements));
getOptions().setJavaScriptEnabled(props.getProperty("com.xceptance.xlt.javaScriptEnabled", false));
getOptions().setThrowExceptionOnScriptError(props.getProperty("com.xceptance.xlt.stopTestOnJavaScriptErrors", false));

// setup JavaScript debugger
if (props.getProperty("com.xceptance.xlt.js.debugger.enabled", false))
{
setJavaScriptDebuggerEnabled(true);

// create JS beautifying response processor only when needed
if (props.getProperty("com.xceptance.xlt.js.debugger.beautifyDownloadedJavaScript", true))
{
jsBeautifier = new JSBeautifingResponseProcessor();
}
}
}
else
{
getOptions().setJavaScriptEnabled(false);
}
getOptions().setJavaScriptEnabled(props.getProperty("com.xceptance.xlt.javaScriptEnabled", false));
getOptions().setThrowExceptionOnScriptError(props.getProperty("com.xceptance.xlt.stopTestOnJavaScriptErrors", false));
configureJavaScriptEngine(props);

// default user authentication
final String userName = props.getProperty("com.xceptance.xlt.auth.userName");
Expand Down Expand Up @@ -448,36 +419,30 @@ public XltWebClient(final BrowserVersion browserVersion, final boolean javaScrip
getOptions().setHistorySizeLimit(historySizeLimit);

// set web connection
final WebConnection underlyingWebConnection;
if (props.getProperty("com.xceptance.xlt.http.offline", false))
{
// we are in offline mode and return fixed responses
underlyingWebConnection = new XltOfflineWebConnection();
}
else
{
final String client = props.getProperty("com.xceptance.xlt.http.client");
final boolean collectTargetIpAddress = ((XltPropertiesImpl) props).collectUsedIpAddress();
if ("okhttp3".equals(client))
{
final boolean http2Enabled = props.getProperty("com.xceptance.xlt.http.client.okhttp3.http2Enabled", true);
underlyingWebConnection = new OkHttp3WebConnection(this, http2Enabled, collectTargetIpAddress);
}
else
{
// the default connection
underlyingWebConnection = new XltApacheHttpWebConnection(this, collectTargetIpAddress);
}
}
configureWebConnection(props);

XltLogger.runTimeLogger.debug("Using web connection class: " + underlyingWebConnection.getClass().getName());
// load key/trust material for client/server authentication
configureKeyStore(props);
configureTrustStore(props);
}

final XltHttpWebConnection connection = new XltHttpWebConnection(this, underlyingWebConnection);
setWebConnection(connection);
/**
* {@inheritDoc}
*/
@Override
public void reset()
{
super.reset();

// load key/trust material for client/server authentication
setUpKeyStore(props);
setUpTrustStore(props);
final XltProperties props = XltProperties.getInstance();

// create a new instance of "our" JavaScript engine if needed
configureJavaScriptEngine(props);

// create a new instance of "our" web connection
configureWebConnection(props);

pageLocalCache.clear();
}

/**
Expand Down Expand Up @@ -2059,14 +2024,86 @@ else if (s.equals("resync"))
}
}

/**
* Sets up the JavaScript engine to be used by this web client.
*
* @param props
* the configuration
*/
private void configureJavaScriptEngine(final XltProperties props)
{
if (isJavaScriptEngineEnabled())
{
// setup JavaScript engine
int optimizationLevel = props.getProperty("com.xceptance.xlt.js.compiler.optimizationLevel", -1);
if (optimizationLevel < -1 || optimizationLevel > 9)
{
XltLogger.runTimeLogger.warn("Property 'com.xceptance.xlt.js.compiler.optimizationLevel' is set to an invalid value. Will use -1 instead.");
optimizationLevel = -1;
}

final boolean takeMeasurements = props.getProperty("com.xceptance.xlt.js.takeMeasurements", false);

setJavaScriptEngine(new XltJavaScriptEngine(this, optimizationLevel, takeMeasurements));

// setup JavaScript debugger
if (props.getProperty("com.xceptance.xlt.js.debugger.enabled", false))
{
setJavaScriptDebuggerEnabled(true);

// create JS beautifying response processor only when needed
if (props.getProperty("com.xceptance.xlt.js.debugger.beautifyDownloadedJavaScript", true))
{
jsBeautifier = new JSBeautifingResponseProcessor();
}
}
}
}

/**
* Sets up the web connection to be used by this web client.
*
* @param props
* the configuration
*/
private void configureWebConnection(final XltProperties props)
{
final WebConnection underlyingWebConnection;
if (props.getProperty("com.xceptance.xlt.http.offline", false))
{
// we are in offline mode and return fixed responses
underlyingWebConnection = new XltOfflineWebConnection();
}
else
{
final String client = props.getProperty("com.xceptance.xlt.http.client");
final boolean collectTargetIpAddress = ((XltPropertiesImpl) props).collectUsedIpAddress();
if ("okhttp3".equals(client))
{
final boolean http2Enabled = props.getProperty("com.xceptance.xlt.http.client.okhttp3.http2Enabled", true);
underlyingWebConnection = new OkHttp3WebConnection(this, http2Enabled, collectTargetIpAddress);
}
else
{
// the default connection
underlyingWebConnection = new XltApacheHttpWebConnection(this, collectTargetIpAddress);
}
}

XltLogger.runTimeLogger.debug("Using web connection class: " + underlyingWebConnection.getClass().getName());

final XltHttpWebConnection connection = new XltHttpWebConnection(this, underlyingWebConnection);
setWebConnection(connection);
}

/**
* Sets up the key store with the client key to be used by this web client. The store is read from a file specified
* in the test suite configuration.
*
* @param props
* the configuration
*/
private void setUpKeyStore(final XltProperties props)
private void configureKeyStore(final XltProperties props)
{
final String storeFilePath = props.getProperty("com.xceptance.xlt.tls.keyStore.file");
if (StringUtils.isNotBlank(storeFilePath))
Expand All @@ -2086,7 +2123,7 @@ private void setUpKeyStore(final XltProperties props)
* @param props
* the configuration
*/
private void setUpTrustStore(final XltProperties props)
private void configureTrustStore(final XltProperties props)
{
final String storeFilePath = props.getProperty("com.xceptance.xlt.tls.trustStore.file");
if (StringUtils.isNotBlank(storeFilePath))
Expand Down
Loading

0 comments on commit 171855f

Please sign in to comment.