TL;DR: We proudly announce the release of Neodymium 5.0.0. Neo is a Java-based test library for web automation that utilizes existing libraries (Selenide, WebDriver, Allure, JUnit, Maven) and concepts (localization, test multiplication, page objects) and adds missing components such as test data handling, starter templates, multi-device handling, and other small but useful everyday helpers.
Our R&D team has been busy brewing! So today we finally get back on the major release train and present you the new Neodymium 5.0.0. It comes with a lot of new little convenience features, giving you more control and possibilities on your test automation. A better browser control, improved configuration possibilities and a bunch of new annotations like @DataItem, @WorkInProgress, @RandomBrowser, will help you set up and configure your test automation to your specific needs. Even if a picture says more than 1000 words sometimes it’s a pain to see on a single screenshot, why the automation journey broke, to help you in such cases, we introduced video recording, to exactly see what happened during the whole user journey.
See below for what you can find inside the big box of updated code:
Update
Up-to-Date with Selenium 4 and Selenide 7
Neodymium was reworked to run with Selenide version 7, so all the cool features Selenide and Selenium offer with their new versions can be used in Neodymium as well.
New Features
JUnit 5 Support
Neodymium now supports JUnit 5, offering a more elegant way to define tests and tag them for combination into test suites. This feature allows for easier development of extensions and customization of tests, seamlessly integrating with Neodymium’s feature set.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
@Browser("Chrome_1200x768") @Browser("Firefox_1200x768") public class UserTests { @DataItem private User user; @BeforeEach public void setup() { clearBrowserCookies(); } @WorkInProgress @RandomDataSets public void testNewsletterState() { HomePage homepage = OpenHomePageFlow.flow(); homepage.checkNewsLetterState(user.getEmail()); // TODO finish implementation (work in progress) } @NeodymiumTest @DataSet(id = "validUserTest") @RandomDataSets public void testLoginSuccess() { HomePage homepage = OpenHomePageFlow.flow(); LoginPage loginPage = homepage.openLoginPage(); loginPage.validateStructure(); loginPage.sendLoginForm(user); loginPage.validateUserLoggedIn(user); } @NeodymiumTest @DataSet(id = "missingPasswordTest") @DataSet(id = "missingUserTest") @RandomBrowsers public void testLoginWithoutRequiredFields() { HomePage homepage = OpenHomePageFlow.flow(); LoginPage loginPage = homepage.openLoginPage(); loginPage.validateStructure(); loginPage.sendLoginForm(user); loginPage.validateLoginFailed(); } } |
Introducing Test Recording
A major highlight of Neodymium 5.0.0 is the support for test recording. This feature enables the creation of video or GIF recordings of test executions, providing a visual representation of how tests navigate through designed scenarios. This allows for in-depth reviews of tests in action, helping to identify and improve areas that may need refinement.
Improvements
Enhanced Test Execution Filtering: use regular expressions (regex) for class name, method name and data set IDs to filter test case execution
Standard Download Folder Configuration: for Chrome and Firefox
Locale Check Functionality: verify if a given locale matches a specified list similar to the existing Neodymium.isSite(String… sites) method
@WIP Annotation for Focused Testing: run a single test while implementing new stuff
@RandomDataSet Annotation: run tests with a certain amount of random data sets from a defined test data list @DataItem Annotation: instantiate objects with values derived from test data
Optional Waiting Functions: optionalWaitUntilCondition and optionalWaitWhileCondition allow users to wait until an element matches a condition or return false if the element does not match the condition or is not found within the given time
Catching StaleElementReferenceException: improved handling of StaleElementReferenceException for SelenideAddons.$safe.
Customizable Logging: we removed Log4j as the standard logging library allowing flexibility to integrate any logging library of your choice
Timing Settings in Long-Format: aligning with common standards and providing greater precision and clarity in test execution timing
Why Neodymium?
As a company focused on quality assurance and testing, Xceptance always needs test automation software, especially end-to-end automation software. Several years ago we built a Firefox add-on that was designed to create and run browser automation. The tool was primarily used by people who didn’t necessarily have a strong background in software development. Today, the landscape is a bit different: Mozilla cut the cord on the APIs we were using and standard programming languages have largely taken over test automation because they are more flexible and less proprietary. These changes convinced us it was time to implement an idea we had already hatched, namely our own Open Source test automation project: Neodymium. It is written in and utilizes the Java platform, it is MIT licensed, and of course you will find it on GitHub: https://github.com/Xceptance/neodymium-library
Basis
There are many libraries out there to aid web automation in Java, so developers are faced with the task of choosing ones they like and somehow making them work together. On top of that, there are tasks that require some custom code to work properly. We identified the overall tooling problem mostly as a hurdle in getting started and setting up a project. Finally, there are always things missing such as test data handling, concurrency, and common patterns which you don’t want to have to develop yourself.
We chose JUnit, Selenide, WebDriver, Maven, and Allure for the base tooling. Selenide provides an easy-to-use API to control Selenium WebDriver. Allure offers good mechanics to generate useful reports based on the assertions and actions you perform throughout your test cases. Maven is used to set up the build and execution environment for our framework and all the test projects. We decided to use JUnit as the test runner since it is the de facto standard in the Java world, but we enhanced the capabilities of JUnit to do even more. At its heart, Neodymium is a JUnit runner that wraps default JUnit behavior and adds significant useful functionality to it.
Documentation and Templates
Does Neodymium address some of your test automation challenges? Does it sound like a good entry point for your test automation?
Neodymium is hosted on GitHub (https://github.com/Xceptance/neodymium-library), where the accompanying project wiki (https://github.com/Xceptance/neodymium-library/wiki) provides extensive documentation to help you get started and answer your questions. You might also want to take a look at the comprehensive example projects using Neodymium with Cucumber (https://github.com/Xceptance/neodymium-cucumber-example) or plain Java (https://github.com/Xceptance/neodymium-example). We’ve even provided a template project (https://github.com/Xceptance/neodymium-template) to get you started automating in no time.