Skip to main content

Posts

Showing posts with the label testing

Chrome for Testing: Browser Automation made easy

Introduction Google Chrome for Testing is a new Chrome flavor that specifically targets web app testing and automation use cases. Browser and Driver Setup and Maintenance Setting up a browser testing environment is a difficult task, and it needs more effort to keep the browser and the chrome driver up-to-date and it is a top web developer / automation engineer's pain point The Auto-Update One of Chrome’s most notable features is its ability to auto-update. This helps the users to keep their browsers up-to-date with the latest upgrades and be safe when they are online As a developer / automation engineer, running a suite of end-to-end tests requires the below aspects to be taken care of You want consistent, reproducible results across repeated test runs—but this may not happen if the browser executable or binary decides to update itself in between two runs. You want to pin a specific browser version and check that version number into your source code repository, so that yo

Helpful functions from org apache commons collections

Introduction There are times when we are faced with the option to get the intersection of 2 lists. The type of list can be either a simple type like number / strings or a complex type like Object. This might involve developers building loops and performing comparison. This can be resulting in not following the DRY principle where we do not have to repeat ourselves what is already implemented. We can leverage the functionality provided in the collections4 library which can help us get the desired result. In this example, let us consider the following example.  Sample Scenario We can consider a "Cart" store which keeps track of the various items that we have added the cart. Every addition or deletion of the item to the cart needs to be updated. User's normally add some items and when they find out that their product of interest has its availability, they would want to add that to the cart and balance out by removing a lesser priority item. Now, when the user proceeds for th