Yoma Fleet Tech Guide: Scaling E2E Testing with Nightwatch.js

Yoma Fleet Tech Guide: Scaling E2E Testing with Nightwatch.js

Yoma Fleet Tech Guide: Scaling E2E Testing with Nightwatch.js

Introduction to End-to-End Testing with Nightwatch.js

In today’s fast-moving tech world, making sure an app works smoothly from start to finish is vital. While unit tests check if small parts of the app function correctly, end-to-end (E2E) tests make sure the whole app works together seamlessly. At Yoma Fleet, we use E2E testing to deliver a smooth and reliable experience for everyone using our products.


What is Nightwatch.js?

Nightwatch.js is a tool that helps us test our web app automatically. It’s built using JavaScript, which is a popular programming language, and it allows our team to check how different parts of our app behave when used together. Nightwatch.js works well with other tools like Selenium WebDriver, which automates browser actions, making it easier to test our app across different web browsers.

Key Features of Nightwatch.js
Easy to UnderstandNightwatch.js has a simple way of writing tests, making it easy to use.
Runs Tests AutomaticallyIt comes with a feature that lets us run tests automatically, which saves time and effort.
Works with Multiple BrowsersNightwatch.js supports all major web browsers, so we can test our app on different platforms.
Checks App BehaviorIt allows us to verify if our app behaves as expected by checking various elements on the web pages.

How Yoma Car Share App Uses Nightwatch.js for Testing

Our end-to-end (E2E) testing setup, powered by Nightwatch.js and integrated into our CI/CD pipeline, plays a critical role in stabilizing every release. With the help of AWS CodeBuild, test executions are automatically triggered from our E2E test repositories, simulating real-world scenarios across both LambdaTest Cloud for cross-browser testing and an ECS Cluster that mirrors our production infrastructure.

This setup ensures:

  • Consistent, repeatable test runs across environments.
  • Immediate feedback on potential issues before code reaches production.
  • Reliable infrastructure testing in environments that closely resemble live usage.

By automating both the test execution and the data setup (via our test data repo), we reduce human error and eliminate guesswork. This gives our team:

  • Greater confidence in every code deployment.
  • Faster iteration cycles without compromising quality.
  • Early detection of regressions, ensuring the app remains stable as features evolve.
How Nightwatch.js works - Yoma Fleet
Image. E2E processes on our products

We use Nightwatch.js to make sure our car share app works perfectly for our users. Here’s how it helps us:

Covering All Scenarios

Nightwatch.js allows us to write tests that cover a wide range of user actions, making sure our app works well in different situations. This helps us catch issues that might be missed if we only tested small parts of the app individually.

Saving Time and Effort

Running tests manually can take a lot of time, but Nightwatch.js automates the process, making it much faster. This means our team can focus on improving the app while the tests run in the background.

Finding Problems Early

One of the best things about automated testing is that it helps us spot problems early in the development process. By fixing these issues right away, we avoid bigger problems later, ensuring our app stays stable as we make updates.

Reliable Testing Every Time

Manual testing can sometimes lead to mistakes, but with Nightwatch.js, our tests are consistent and reliable. This helps us maintain high-quality standards, so every new version of our app meets our expectations.

Testing Real-Life Scenarios

It’s important for us to see how different parts of our app work together in real-life situations. Nightwatch.js allows us to simulate user journeys, like booking a car or checking availability, to ensure everything works smoothly.

Managing Test Data

For our tests, we sometimes use data that’s already prepared, and other times we create data on the spot. Nightwatch.js makes it easy to manage this data, ensuring our tests are realistic and relevant. We use a system called the Builder Pattern, which helps us keep our test cases organized and consistent.


Leading the Way in Automated Testing

At Yoma Fleet, we’re proud to be one of the first companies in Myanmar to use advanced testing tools like Nightwatch.js. By adopting automated testing, we’ve improved the quality of our car share app, setting a new standard for software testing in the region.

With Nightwatch.js, our team works more efficiently, ensuring that our app is always user-friendly and reliable. Automated testing is a key part of how we develop and maintain our app, helping us provide the best possible experience for our users.


Conclusion

Nightwatch.js has changed the way we test our car share app at Yoma Fleet. Its ease of use, speed, and powerful features have made our testing process smoother and more reliable. As we continue to grow and innovate, automated testing will remain a crucial part of our journey, ensuring that our app always meets the needs of our users.

Read our Engineering at Yoma Fleet blogs here.