My Key Tools for Automation

With this new project now fully under way, I have noted 3 pivotal tools that make code development much faster than before. TypeIt4Me (Text Expander) – I had this last time, but it now has a couple dozen code fragments at the ready. I have entries for getText, setText, click, waitForElementVisible, for, while, case, replaceAll, and a bunch more. I type the name of the command I want, and it gets converted to the full syntax with placeholders where the names of variables and objects should go. If I type something more than twice, it goes into the Text Expander and probably saves an hour per day of typing and looking up the syntax. CopyLess (Clipboard Manager) – This is a huge help for duplicating object names and lines of code. I can copy multiple things at once, then paste them back in whenever I need them. I don't lose the last thing I copied. I also don't have to […]

What the deuce is this nonsense?

This isn't my code, but it was written by a consulting company we brought in quite some time ago. They worked on some automation code, that was supervised by someone else. Neither that person, nor the consulting company work with us anymore. It appears they did some work on the site I am currently building out. I found dozens of instances of code like the following, and I have to shake my head in wonder as to what they were thinking. cropAcreValue = cropAcreValue.toString().toInteger() if (QA_submittedBy.toString().trim().equalsIgnoreCase('')) { I can't even begin to understand how they thought this was a good idea. I know my code isn't very good at times, but at least I'm not writing stuff like that and committing it to Master.

What’s in a Method?

Here is a style question. For a test I am working on, I have a simple table that lists a User Role. That role is a clickable link. I have two things I want to check on this page. First, I want to check that the User Role is a known text value, such as Admin or Sales Rep. Second, I want to check that the link for that role is Clickable. This is a simple validation test of two pieces of information. But, the question is, should both of these items be checked within one method, or should it be done as two? This is a simple example, where the isClickable is determined right after the searchResult. It's something I am literally working on right now. Is it more advantageous and proper to have the method check a single point of failure, or should it work on related items at the same time without making another call? Example 1: […]

Building an automation project, some error handling

As I mentioned, I write automation code in phases, the same process that is done for editing photos in Photoshop or writing a novel. Photos are edited in layers. Each layer adds a small change to the overall image. Novels start with an outline. The outline is then turned into chapters. The chapters are broken down into scenes. A scene may only be a few paragraphs. Those are then connected to the next scene, which might only be a couple of paragraphs. Automation follows a similar process. I pick a set of pages I want to work with. They might be relevant for a production smoke test. Or they might be the more important or more frequently used sections. Either way, my goal isn't to write automation for the entire site. The goal is to pick important or high traffic areas and focus on those first. Once inside Katalon, the goal of the first phase is to map out the […]

Time for a new automation project

For the past two years I have been the dedicated QA engineer for a single customer, watching their site grow from a small dashboard to an inventory management system. During that time, Katalon was introduced and I focused on building dozens of test cases to test major portions of functionality. I learned a huge amount and my automation project went through 5 major rewrites. With that project being feature complete, I am turning over the reins to work on a new project. I have the opportunity to write all new automation code, from the ground up, taking into account everything I learned, especially from the mistakes I made. This week I have completed my first pass. Like working in Photoshop, or writing a first draft, I put my code together in layers or phases. I prefer to start with a series of small tests that touch multiple parts of a site, rather than create one large, deeply dynamic test. My […]