Skip to main content

4 posts tagged with "core"

View All Tags

Simplifying test automation infrastructure

Β· 3 min read

The Serenity/JS team is excited to unveil version 3.30, a release focused on helping you simplify your test automation infrastructure. This update introduces:

  • streamlined installation process for Serenity BDD,
  • support for Node-only artifact registries like Verdaccio,
  • support for Playwright 1.49,
  • all Serenity/JS Project Templates updated to reflect these improvements.

Let’s explore what’s new!

New to Serenity/JS?

New to Serenity/JS or test automation? Start with "Your first web scenario", praised by our community as "the best guide to take your automation skills to the next level."

New in Serenity/JS 3.30​

Streamlined Serenity BDD Installation​

One of the most exciting additions in this release is the inclusion of the Serenity BDD CLI jar file directly within the @serenity-js/serenity-bdd Node module. This improvement eliminates the need for a separate download, helps to simplify the installation process, and reduces friction for teams getting started with Serenity/JS (#2560).

We owe special thanks to Anton Fedorov from Amazon Web Services for proposing this feature and contributing its implementation. Anton’s work is a fantastic example of the open-source spirit driving Serenity/JS forward.

Thank you, Anton!

Improved support for private and Node-only artifact registries​

Serenity/JS has always supported private artifact registries like Sonatype Nexus or JFrog Artifactory. However, corporate proxies and network constraints could sometimes make the setup process a bit more complex than we would have liked.

Serenity/JS 3.30 includes the Serenity BDD CLI jar directly in the @serenity-js/serenity-bdd Node module. This change simplifies your infrastructure by letting you use a single registry for both Node modules and the Serenity BDD CLI jar and enables support for Node-only artifact registries like Verdaccio.

Playwright 1.49 compatibility​

Keeping Serenity/JS at the cutting edge of browser automation, this release introduces support for Playwright 1.49. With it, you can leverage the latest advancements in browser automation across Chromium, Firefox, and WebKit.

Additionally, Playwright 1.49 brings improved handling and more accurate reporting on nested errors (playwright#26848), making it easier to diagnose issues with custom Serenity/JS configuration (#1823).

Updated Serenity/JS Project Templates​

Getting started with Serenity/JS has never been easier! The Serenity/JS Project Templates have been updated to reflect the latest improvements, helping you kickstart your projects with best practices built right in.

Upgrading to Serenity/JS 3.30​

To upgrade your existing project to Serenity/JS 3.30, use a tool like npm-check-updates:

npx -y npm-check-updates '/@serenity-js|playwright/' -u

Next, remove the call to serenity-bdd update from your package.json file:

{
"scripts": {
- "postinstall": "serenity-bdd update",
"clean": "rimraf target",
"test": "failsafe clean test:execute test:report",
"test:execute": "playwright test",
"test:report": "serenity-bdd run"
}
}

Finally, install the updated modules:

npm install

Your feedback matters!​

I hope this latest release of Serenity/JS will make it even easier for you and your team to create high-quality test automation.

Let me know what you think of the new features in the comments below πŸ‘‡πŸ‘‡πŸ‘‡

πŸ“£ Stay up to date​

New features, tutorials, and demos are coming soon! Follow Serenity/JS on LinkedIn, subscribe to Serenity/JS channel on YouTube and join the Serenity/JS Community Chat to stay up to date! Please also make sure to star ⭐️ Serenity/JS on GitHub to help others discover the framework!

Follow Serenity/JS on LinkedIn Watch Serenity/JS on YouTube Join Serenity/JS Community Chat GitHub stars

πŸ’› Support Serenity/JS​

If you appreciate all the effort that goes into making sophisticated tools easy to work with, please support our work and become a Serenity/JS GitHub Sponsor today!

GitHub Sponsors

Introducing Numeric

Β· 3 min read

Love numbers? You'll love Serenity/JS 3.29! πŸŽ‰

We’re excited to share the latest release of Serenity/JS, which is packed with new powerful features for handling numeric data in your automated tests!

New to Serenity/JS?

New to Serenity/JS or test automation? Start with "Your first web scenario", praised by our community as "the best guide to take your automation skills to the next level."

New in Serenity/JS 3.29​

Built-in support for arithmetic operations​

Part of the Serenity/JS Core module, the new Numeric class offers built-in support for performing arithmetic operations on both synchronous and asynchronous data types directly within your Serenity/JS test scenarios.

In addition, this new class offers methods to help you extract numeric data from REST API responses and web interfaces and convert it to a desired numeric data type without any external libraries or complex workarounds.

This enhancement makes your tests more readable, reduces the risk of calculation errors, and ensures data-driven scenarios are both easy to implement and maintain. With Numeric, your test logic is cleaner, making Serenity/JS even more developer-friendly.

Learn about Numeric.

More Serenity/JS examples in your IDE!​

We continue our effort to bring the thousands of examples available in the Serenity/JS API documentation close to you and your team. As part of that, the new Numeric class ships with 15 new examples, demonstrating how to extract numeric data from user interfaces and data objects. You'll also learn how to use the new features with Serenity/JS Page Element Query Language to make extracting the right UI element even easier!

Check out the Serenity/JS API docs at https://serenity-js.org/api/

Enjoy Serenity!

Numeric API Documentation in Your IDE

Your feedback matters!​

I hope this latest release of Serenity/JS will make it even easier for you and your team to create high-quality test automation.

Let me know what you think of the new features in the comments below πŸ‘‡πŸ‘‡πŸ‘‡

πŸ“£ Stay up to date​

New features, tutorials, and demos are coming soon! Follow Serenity/JS on LinkedIn, subscribe to Serenity/JS channel on YouTube and join the Serenity/JS Community Chat to stay up to date! Please also make sure to star ⭐️ Serenity/JS on GitHub to help others discover the framework!

Follow Serenity/JS on LinkedIn Watch Serenity/JS on YouTube Join Serenity/JS Community Chat GitHub stars

πŸ’› Support Serenity/JS​

If you appreciate all the effort that goes into making sophisticated tools easy to work with, please support our work and become a Serenity/JS GitHub Sponsor today!

GitHub Sponsors

Better API documentation

Β· 3 min read

In the ever-evolving world of software development, the importance of clear, concise, and accessible documentation cannot be overstated. The Serenity/JS team is thrilled to announce a series of significant improvements to our API documentation, designed to enhance the developer experience and streamline the process of building automated acceptance tests. These updates are crafted to support developers at every stage of their journey, from understanding the basics to mastering the intricacies of the framework.

A new gateway to learning​

The newly revamped API Docs landing page serves as the central hub for all things Serenity/JS, providing a comprehensive overview that we believe is both welcoming to newcomers and invaluable to seasoned developers. The landing page is now your go-to resource for navigating the extensive Serenity/JS ecosystem. Whether you’re looking for detailed class references, method signatures, or specific modules, the structured layout ensures that everything you need is just a click away.

Compatibility at a glance​

One of the standout additions to our documentation is the Serenity/JS compatibility matrix, a tool we believe will help developers stay up to date with their project's dependencies.

This page is especially useful because:

  • Version Matching: It allows you to quickly determine which versions of Serenity/JS are compatible with your project’s existing setup, helping to prevent integration issues before they arise.
  • Upgrade Guidance: The matrix offers insights into the latest compatible versions, making it easier for developers to plan upgrades without disrupting their workflow.
  • Cross-Referencing: Links to detailed release notes and API changes offer immediate access to further information, enabling you to make informed decisions about when and how to update your dependencies.

API documentation in your IDE​

Another exciting improvement is the availability of diagrams, examples, and direct links to the API documentation directly within your IDE. These enhancements ensure that you have all the necessary resources at your fingertips, right when you need them. With context-specific information available inline, you no longer need to interrupt your workflow to search for documentation elsewhere.

  • Contextual Diagrams: Visual representations of class hierarchies and relationships help you understand how different parts of the framework interact, improving comprehension and reducing errors.
  • Embedded Examples: Code snippets within the IDE provide immediate examples of how to implement specific features, speeding up development and reinforcing learning.
  • Instant Documentation Links: With direct links to the Serenity/JS API docs embedded in your code editor, you can quickly reference detailed documentation without breaking your focus.

These improvements are designed to keep developers in their flow, reducing the time spent searching for information and increasing productivity.

API Documentation in Your IDE

Your feedback matters!​

I hope this latest release of Serenity/JS will make it even easier for you and your team to create high-quality test automation.

Let me know what you think of the new features in the comments below πŸ‘‡πŸ‘‡πŸ‘‡

πŸ“£ Stay up to date​

New features, tutorials, and demos are coming soon! Follow Serenity/JS on LinkedIn, subscribe to Serenity/JS channel on YouTube and join the Serenity/JS Community Chat to stay up to date! Please also make sure to star ⭐️ Serenity/JS on GitHub to help others discover the framework!

Follow Serenity/JS on LinkedIn Watch Serenity/JS on YouTube Join Serenity/JS Community Chat GitHub stars

πŸ’› Support Serenity/JS​

If you appreciate all the effort that goes into making sophisticated tools easy to work with, please support our work and become a Serenity/JS GitHub Sponsor today!

GitHub Sponsors

Introducing dynamic descriptions

Β· 8 min read

πŸ“£ Serenity/JS Tasks, Interactions and Questions now support dynamic descriptions πŸŽ‰

With the new release of Serenity/JS 3.24, descriptions of Tasks, Interactions, and Questions, including assertions and synchronisation statements, can be determined dynamically at runtime and incorporate the actual values of static and dynamic parameters you passed in.

The new dynamic descriptions feature is particularly useful when designing custom Serenity/JS tasks that accept notes or other dynamic data structures like questions, question adapters, or answerables.

Long story short: to use dynamic descriptions, upgrade to Serenity/JS 3.24 and replace d with the in your custom Task and Interaction definitions:

- import { Task, d } from '@serenity-js/core';
+ import { Task, the } from '@serenity-js/core';

export const recordItem = (name: Answerable<string>): Task =>
- Task.where(d`#actor records an item called ${ name }`,
+ Task.where(the`#actor records an item called ${ name }`,
Enter.theValue(name).into(newTodoInput()),
Press.the(Key.Enter).in(newTodoInput()),
Wait.until(itemNames(), contain(name)),
)

This tiny change to your code will enable your Serenity reports to show the actual values of your task and interaction parameters.

Support for dynamic descriptions

Want to learn more? Read on!