Sometimes, while writing tests with tools like Mocha, you may want to perform certain operations before the tests. These operations might include the initial setup of global services or resources and configuration for the tests. Mocha’s beforeEach method makes these test setups easier and reduces code duplication. Mocha has several hooks, including before, after, beforeEach,…
Year: 2022
After creating a React app, testing and understanding why your tests fail are vital. When debugging, you’re trying to identify and solve the error. When a test fails, it tells you what has gone wrong and why—in short, testing and debugging work in tandem. Debugging is the process of finding and fixing bugs. As a…
Salesforce is, without a doubt, the world’s leading cloud-based customer relationship management (CRM) platform. In addition to its numerous advantages, Salesforce can help you understand your customers better and improve their satisfaction, eventually resulting in your company’s growth. With Salesforce becoming increasingly critical, businesses look for more sophisticated and efficient ways to ensure the quality…
Many people, upon hearing “automated testing,” automatically think of unit tests. That’s understandable; after all, unit testing is one of the most well-known types of automated tests. However, it’s far from being the only one. We have UI testing, end-to-end testing, load testing, and that’s just to name a few. Today’s post—as you can see…
JBehave is a Java testing framework for Behavior-Driven Development (BDD.) It’s been around for many years with regular updates, including an update to 5.0 in 2022. But, it still doesn’t get the attention and respect it deserves. In this article, we’ll take a quick look at what BDD is and how you can use it…
We all know that unit tests must not interact with external dependencies—databases, HTTP services, the filesystem, etc. You must resort to mocking those dependencies. This presents a problem: sometimes you have to mock code you didn’t write, presented in the form of static methods. In this post, you’ll learn how to deal with this challenge…
Data obfuscation is a term that every developer should comprehend and implement into every project. Obfuscation refers to the act of making something appear different from its actual form. To a security-aware developer, the term refers to any method used when hiding the actual value of a data object. In the realm of software testing,…
Selenium is a tool that developers can use to automate the testing of web apps. With this tool, it’s possible to write test scripts that perform several actions. For example, you can use Selenium to load a webpage, click on links and buttons, or even type text into an input field. Another important action Selenium…
Selenium is a popular browser automation tool. Using Selenium, you can automate almost every action a regular user can perform on a web browser. For example, with Selenium, you can write a small script that can open a webpage and then complete a form on the page. However, to carry out an operation like this,…
Here we are again in our never-ending quest to spread the word about automated testing. Today’s topic is one we’ve already covered, but with a different spin: regression testing. What is regression testing? Well, while the previous post was mainly about definitions—and we do recommend you check it out—we’ll offer a short version here nonetheless….