The modular pattern of software testing includes both writing and organizing tests. In the modular test, tests are written as small, function-based tests and then placed in execution within the test suite. Each function-specific test provides particular user behavior.
With the Modular testing Approach, we can save time by reusing the already created Module of the test and save the time of QA to rewriting the same scenarios. Also, change in one place affects on followed test cases also.
Writing the same test cases for each module is always a chore. It is not just a waste of time, but also a waste of effort. Test cases should always be reusable. The Modular test design technique allows us to reuse test cases across many projects and modules. Modular test design is commonly used for End-to-end testing. For example, suppose you have an e-commerce application and want to test the Add to Cart feature. The user must be logged in to the application to add a product to the cart, You've already written the Login test cases for the application, so you don't need to repeat them in the Adding product to cart test cases. You can just call the steps of Login test cases in the test case of Adding a product to the cart and it is possible only with the X-Ray test case management tool.
Instead of updating several test cases across multiple projects and modules, you only need to update the test cases when a feature changes. As a result, maintenance costs are reduced. Test cases are written for specific features rather than the entire project, allowing for more attention to each feature and more robust tests.
For more info related to modular tests, refer to this doc: Modular Tests - Xray Cloud Documentation - Xray
Page Object Model is a common pattern that introduces abstractions over web app pages to simplify interactions with them in multiple tests.
Playwright Test is based on the concept of test fixtures. Test fixtures are used to establish an environment for each test, giving the test everything it needs and nothing else. Test fixtures are isolated between tests. With fixtures, you can group tests based on their meaning, instead of their common setup.
Here is a list of the pre-defined fixtures that you are likely to use most of the time: