JLineup is a tool which is useful for automated visual regression tests of web pages, especially in continuous delivery pipelines. It can be used as a simple command line tool or as a small web service which is controlled via REST API.
JLineup shoots and compares screenshots of a web page at two consecutive points in time. It does a pixel by pixel comparison of both runs and generates a HTML and a JSON report. Behind the scenes, it uses Selenium and a browser of choice (currently Chrome, Chromium and Firefox are supported).
JLineup has no other dependencies than web browser (Firefox or Chrome/Chromium) and a JVM. Experimental: There's also a self-contained Linux AMD64 build of the CLI version that doesn't even require a JVM.
Let's take this little example config for a check of otto.de during a deployment:
{
"urls": {
"https://www.otto.de": {
"paths": [
"/"
],
"devices" : [ {
"width" : 850,
"height" : 600,
"pixel-ratio" : 1.0,
"device-name" : "DESKTOP",
"touch" : false
}, {
"width" : 1000,
"height" : 850,
"pixel-ratio" : 1.0,
"device-name" : "DESKTOP",
"touch" : false
}, {
"width" : 1200,
"height" : 1000,
"pixel-ratio" : 1.0,
"device-name" : "DESKTOP",
"touch" : false
} ]
}
},
"wait-after-page-load" : 0.5,
"browser" : "chrome-headless"
}
JLineup runs before and after the deployment and generates a report like this:
There's also a JSON report, which is great if you want to check things by script:
JLineup CLI comes as executable Java Archive. Java 17 or higher has to be available to run it.
Open a terminal and download it like this:
wget https://repo1.maven.org/maven2/de/otto/jlineup-cli/4.13.6/jlineup-cli-4.13.6.jar -O jlineup.jar
Then type
java -jar jlineup.jar --help
to see the command line help.
See the CLI documentation for more details and a small tutorial.
This is an example, how JLineup can be helpful in your automated build and deploy pipeline. Let's assume, this is part of a continuous integration pipeline:
JLineup 4.13.6 was tested successfully with
- Chrome 135.x
- Firefox 137.x
Chrome or Firefox have to be installed on the system if you want to use one of them.
JLineup uses some third party tools and libraries
- Selenium is licensed under the Apache 2.0 License.
- Webdrivermanager is licensed under the Apache 2.0 License.
- Jackson is licensed under the Apache 2.0 License.
- Logback is licensed under the Eclipse Public License.
- The SLF4J API is licensed under the MIT License.
- Thymeleaf is licensed under the Apache 2.0 License.
- Edison Microservice is licensed under the Apache 2.0 License.
- Spring Boot is licensed under the Apache 2.0 License.
- The binary cli version is built with GraalVM Community Edition. GraalVM CE brings it's own Product License.
- Image Compare Viewer is licensed under the MIT License.
- Google Fonts are used in the HTML report. These are the terms.
- AWS SDK for Java 2.0 is licensed under the Apache 2.0 License.
Some code from Pixelmatch was ported to Java for JLineup.
- Pixelmatch is licensed under the ISC License.
Some code from Looks-same was ported to Java for JLineup.
- Looks-same is licensed under the MIT License.
JLineup is a configuration compatible replacement for Lineup, implemented in Java. The original Lineup was a Ruby tool, but is not maintained any more.
Credit for original Lineup goes to Finn Lorbeer.
This is a note regarding the migration of JLineup's publishing process because of https://central.sonatype.org/news/20250326_ossrh_sunset/.
During migration from OSSRH on oss.sonatype.org to the Central Publisher Portal central.sonatype.com I faced a problem uploading the JLineup artifacts, that were accepted by the old publishing process without problems:
Component Summary
1 failed Deployment Validation
Failed to process deployment: Error on building manifests: No Archiver found for the stream signature Details: No Archiver found for the stream signature
After some investigation I found out, that the problem was caused by the fact, that some JLineup jar files were executable jar files,
which were enriched by the Spring Boot Gradle Plugin with the launchScript()
functionality. This is obviously not supported by the new
publishing API and leads to problems after the uploading of the bundle.zip.
I commented the 'launchScript()' functionality in the build.gradle file and was able to publish the artifacts successfully.
bootJar {
enabled = true
//launchScript()
}
I just leave this here to help others, who might face the same problem.
If you have questions or proposals, please open an issue or write an email to marco DOT geweke AT otto.de