Skip to main content

Posts

Adaptive Wait in TestProject

Wait for a certain condition(s) like eg. click, type, etc. to meet and then perform an action is required in almost every UI automation test case. And most of us break our head too much on playing with different dynamic (async) waits which are never-ending practice especially when you have a common framework for your m site as well as your desktop browsers. When I saw that TestProject announced something called Adaptive wait Capability, I tried it and it works wonder. So, if you are already using TestProject, give it a shot. Must say that Adaptive Wait = Smart wait here. Especially when we struggle too much due to different net speed/connections and device physical resources bottlenecks. Check their official documentation for the same here: https://docs.testproject.io/tips-and-tricks/explicit-wait-and-adaptive-wait and https://blog.testproject.io/2020/05/04/testproject-adaptive-wait-capability/ hashtag # TestProject hashtag # automation hashtag # AdaptiveWait

Roles and Responsibilities of QA in Scrum

Created this deck last year: "Roles and Responsibilities of QA in Scrum" Please share your thoughts if you see something terribly wrong and name it. If you have anything to add, I’d love to read and discuss it. hashtag # qa hashtag # agile hashtag # agilemindset hashtag # agileteams

Defining the scope of our End to End tests

We all should try that our End to End test should NOT considerably reiterate the test efforts of our Unit test and API test. Ideally, our end to end should be meant to confirm that user(s) can use our app in the way it's intended to do so, perform interactions with it without hitting any issues and always work when performing any E2E transaction(s). On the other hand, our Unit and API test should test and cover business logic.  Many a time, we go overboard to reach 100% coverage, create an automated mess in terms of freezing a scope of our End to End tests and we might reach to a point: - Where our test source code becomes even the same or in fact, more than the application codebase - And/Or automation execution run time is likely to take the same time as it takes to write the test case, etc. There's no silver bullet here and it's all about trying, failing and finally succeeding. One such approach can be: Divide your test cases broadly into two major groups...

Working Set feature in Eclipse and other IDEs

The "Working Set" is a very old feature in Eclipse or other IDEs but there are many folks who don't use it and prefer to hide non-working project(s) by either closing the project(s) itself or deleting those from workspace especially when they have to demo something to someone. It is a super useful feature that lets you group your related projects to ease search and organize views within the IDE. Read here about what it is and how to use it: http://www.avajava.com/tutorials/lessons/what-is-a-working-set-and-how-do-i-use-it.html

JSON to POJO

In case you have JSON or JSON-Schema (simple or complex) that you want to map into a POJO without hustling too much to write a complete POJO class, then you can use the jsonschema2pojo UI or library. It is an awesome library that lets you create Java classes using your input JSON. Plus, it supports many Annotation styles such as Jackson, Gson, etc. Using UI: http://www.jsonschema2pojo.org Or https://github.com/csanuragjain/extra/tree/master/convertJson2Pojo (Git Repo by Anurag Jain) P.S. There are many other ways to achieve this and this is just one of them.

Benefits of running your automation suite

In the agile world, the deployment window will continue to grow narrow and for sure you can’t catch every bug- so, always use the power of both i.e. on-demand (including webhook on every change) and scheduled automation test suite run.  On one hand, your on-demand test run will make sure that you get fast feedback (i.e. which change and by whom broke it) and also you will get the complete test coverage. And, on the other hand, your scheduled runs ensure that you get continuous feedback, don't push any broken pieces to the next environment and hence confidence in your code changes especially after the integration with the larger system(s). Keep your builds green (Organically).

Copy paste java code from clipboard to your Eclipse

Small but a cool and an old trick for copy-pasting Java code in Eclipse. I have seen so many folks are still doing this when they want to copy-paste the Java code from the net via clipboard in their Eclipse. >Right click on the target folder where you want clipboard Java code >New >Create Class >Give a name and then finally remove the default code in this class and paste the Java code from their clipboard. You don't need to do all this. Just Right-click on the target folder where you want this Java code and paste from the clipboard or directly CTRL+V. Nice- isn’t it? Sample code: package com.test.apiAutomation.test; import java.util.HashMap; import java.util.Map; import org.testng.annotations.Test; public class TestCopyPaste { @Test public static void testCopyPaste() { Map<String, String> formParams = new HashMap<String, String>(); formParams.put("grant_type", "hey"); System.out.println("It's working, TADA...