What are some Selenium WebDriver locator strategies?
Here is my answer to the question from Quora What are some locator strategies that can be used in Selenium WebDriver? Selenium WebDriver has several locator strategies — or methods for locating elements. Whey you want to find an element, you need to locate it on the page. The way Selenium does this is by using Javascript to parse the HTML source content. In Javascript you can do the following: WebDriver has corresponding locator strategies: It also has additional methods for locating by XPATH, CSS Selector, and link text: XPath and CSS selectors are ways to parse the HTML document…
Read moreHow to get started writing unit tests on a large complex codebase without existing tests
A little bit at a time. Developing unit tests for a large scale application can be challenging. Especially if it was written without any tests, or with testing in mind. Writing unit tests requires code to be modular — so you can test a unit in isolation. One of the biggest benefits of writing unit tests during development is not that your code will be well tested, but that it helps you think about writing it in a way that different parts of the application (units) can be tested without interacting with the whole application. But if it hasn’t been…
Read moreWhat is Selenium? Does it support multiple users?
Selenium is a programming tool used to automate the browser — simulating a real user by opening windows, going to URLs, clicking buttons, filling in forms, etc. Selenium is primarily used for test automation, but can also be used for other things. Selenium is available as a library for most popular programming languages, including Java, JavaScript, TypeScript, C#, Python, Ruby, PHP, etc. It is also referred to as Selenium WebDriver, because there were two different projects (Selenium & WebDriver) which did similar things and eventually merged. Selenium uses the WebDriver protocol (a W3C standard now) to communicate over the network…
Read moreCircumnavigar
You know how a search engine can help you with little things like converting units (like: meters cubed to fluid acres) and get other little answers to things like the weather or internet speed or language translations just by typing in your question. AI prompts like ChatGPT have the potential to really enhance this capability (when it’s not going rogue on you (you know: turning racist, expressing creepy affection, threatening to destroy humanity). Anyway, I’ve thought of another little tool I’d like to have built into my search prompt, or available for a writing tool like Grammarly, or whatever that…
Read moreBashing React
Bashing React I’ve been a long-time casual detractor of React.js. The occasional snide remark here & there, or long rant in the internet that nobody ever reads. The gist of my complaint is that it’s overly complicated — while at the same time not doing enough to help developers. Other frameworks (like Angular) are complex, but they aim to provide a more complete solution in a coherent form. To be effect (read: develop something beyond a toy app) With React, you need a whole lot of other things with React that you have to piece together. Redux, React Router, etc.…
Read moreWhat can I do to expand my skills beyond testing?
Someone asked about self-improvement after 10 years as a tester and wanting to expand their knowledge into software development. I can sympathize with this attitude because I went through a similar mindset — which let to my eventual burnout and move to Fiji that I’ve written about previously. Here is my response: After 10 years as a tester you probably have pretty good testing skills. Adding development skills can only increase your value as a tester because it will allow you to communicate better with developers and understand the architecture to find, anticipate, and troubleshoot bugs better. And if you…
Read moreWho cares about this test?
Last week, I wrote about (one way) how to categorize tests. And I promised a follow up about different ways to categorize tests. Or “how to slice the cake” as I put it. This is not that follow up. But after getting some feedback, I thought I’d expand a bit more on the “how” I categorizing tests. So rather than talk about the different slices of cake, I’m going to talk about “why” I sliced it this way. If you get a smaller slice, it’s not (only) because I think you’re fat. And if you get a bigger pice, it’s…
Read moreHow long does it take to learn Selenium and Python
This is another post that grew out of a question asked by someone else online. Here is the original question (and my answer) on Quora: https://www.quora.com/How-long-does-it-take-to-learn-selenium-Webdriver-with-Python There are several different things here, and they affect how long it will take you to learn Selenium with Python. Let’s break it down: Your existing knowledge in each of these topics will affect how easy it is. For example, if you’ve already used Selenium with another programming language, that means that (to some degree) you also know programming and test automation principles. So all you need to learn is Python. But if you…
Read more
Skating on Thin Ice
The weather has been warming up in a Montana recently, leading to a slushy mess in our driveway. But my daughter discovered something today when she went out with her mom to feed the animals… We had a hard re-freeze last nice and the driveway is a sheet of ice. Very slippery, so she abandoned her chores and put on her ice skates.
Read more
ChatGPT’s killer feature
ChatGPT has two killer features, and one gimmick (and one real feature) that gets all the press. The gimmick is the ability to compose (synthesize) coherent texts — write a story or essay, which is enabled by the cool feature — it’s language model, which is able to understand and generate language remarkably well ( Is ChatGPT English only?) But the two killer features that most people are discussing are ChatGPT also has one “un-feature” that makes it valuable. It’s not monetized. Google was great, and page-rank was a good algorithm, until people learned how to game the system with…
Read moreHow do you categorize tests?
Starting a discussion on test types topics…This will probably become an outline for a presentation. Not all tests types will be discussed and some are orthogonal, some not relevant (e.g. to QA). Most of all, definitions of test types are fuzzy and vary. Starting with a simple list…no, starting with my take on categories. (There are 2 types of categories… )I divide software testing (generally) into: A. Developer tests andB. Tester tests There is a third type of tests also, which I’ll call non-tester tests. Things like A/B testing, usability testing, etc. which are performed with a different goal than…
Read moreSelenium Jupiter for tests with less boilerplate code
Following on my recent discovery of Selenium Manager, I checked out another project by Boni Garcia called Selenium-Jupiter. It uses some advanced features of JUnit 5 (aka Junit-Jupiter) to make tests easier to write with less boilerplate code, part of that is using WebDriverManager to automatically instantiate WebDriver instances without downloading chromedriver, putting it in the path, setting webdriver.chrome.driver path in properties or as an environment variable, etc. It starts with an JUnit 5 Extension — similar to JUnit 4 Runners – but you can have more than one extension. Then you can pass a WebDriver instance as a parameter…
Read moreAre companies getting worse at QA testing?
Melissa Perri posed this question on Twitter: Aaron Hodder had a great response on Linkedin: He talks about how companies are giving up on manual testing in favor of automation. Definitely worth the read. My response about the ramifications of automation vs manual testing (it doesn’t have to be either / or): There are two mistakes I often see around this: Both are causes for failure in testing.People often think they will be saving money by eliminating manual QA tester headcount. But it turns out that effective automation is *more expensive* than manual testing. You have to look for benefits…
Read moreSeleniumManager (beta) released with Selenium 4.6.0
So I was working with WebDriverManager this morning and one thing led to another, and I ended up browsing the Selenium source repo (as one does) and saw some curious commits (like these): mark Selenium Manager implementations as beta fix the framework conditionals for Selenium Manager Add Selenium Manager support for Linux & Mac from an old friend Titus Fortner. I reached out to ask him about SeleniumManager — and it turns out it’s a replacement for WebDriverManager incorporated into the Selenium codebase (written by Boni Garcia, the original author of WebDriverManager, in Rust). The various language bindings wrap a…
Read moreLooking for a Tester with GoLang experience
I was just talking with a recruiter looking for a QA engineer with experience using Go programming language for testing. While Go is gaining popularity – especially among systems application developers (for example, Docker is written in Go) and for developing microservices, not a lot of testers have much experience with Go. That’s because Go is relatively new, and if you’re testing something as a black box (as QA typically does) then it doesn’t matter what programming language you use to write tests in. Go does have testing capabilities — primarily targeting unit testing go ci, and at least one…
Read moreTests need to fail
Greg Paskal on the “Craft of Testing” Youtube Channel, talks about the trap of “Going for Green” or writing tests with the aim of making sure they pass. He has some great points and I recommend the video. Here are my comments from watching his post: Two big differences I see with writing test automation vs traditional development: 1. Tests will need to be modified frequently — over a long time, not just until it “passes”. 2. Test failures cause friction, so you need to make sure that a failure means something, not just a pass. What these two principles…
Read moreVMWare Cloud Director Security Vulnerability
If you use VMWare vCloudDirector administration tool for managing your virtualization datacenter, you should be aware of the following vulnerability and patch your systems. “An authenticated, high privileged malicious actor with network access to the VMware Cloud Director tenant or provider may be able to exploit a remote code execution vulnerability to gain access to the server,” VMware said in an advisory. CVE-2022-22966 has a CVSS score of 9.1 out of 10. Upgrading to version VMWARE Cloud Director version 10.1.4.1, 10.2.2.3 or 10.3.3 eliminates this vulnerability. The upgrade is hosted for download at kb.vmware.com. If upgrading to a recommended version is not an…
Read moreAre you only interested in test automation?
“Are you only interested in test automation?” I was asked this question casually, and here is my (detailed) response: My opinion is that test automation serves 3 main purposes: 1. Help developers move faster by giving them rapid feedback as to whether their changes “broke” anything.2. Help testers move faster and find bugs better by doing the boring, repetitive work that takes up their time and dulls their senses.3. Help operations know that deployments are successful and environments are working with all the pieces in place communicating with smoke tests and system integration tests. In each case, the automated tests’…
Read moreStop MacOS from rearranging virtual desktops
Yet another victory over MacOS!To stop MacOS from rearranging your virtual desktops (after you have them just the way you want them):Go to System Preferences > Mission ControlUncheck “Automatically rearrange Spaces based on most recent use” Thanks to:https://www.appsntips.com/learn/how-to-stop-mac-spaces-from-rearranging-themselves-on-macos/ P.S. If virtual desktops (or “Spaces” as Apple calls them) are new to you: Press “F3” to view your virtual desktops. You can have multiple Spaces to group related windows and then swipe left & right between them using 3 fingers on your trackpad or magic mouse.
Read moreReact.js feels like it was designed by AI
The popular web framework can be used to solve the problem of how to put text on a screen, but it’s almost like someone fed a machine the JavaScript specification and it iterated on a random sequence of code that parses until it hit on a result that creates an acceptable web page. React’s syntax is bizarre, heavily uses obscure, little used language features that nobody knows about, and in fact only exist because the JavaScript spec is so loose. There also appears to be no deliberate design or regard for conventions, readability, or structure. Even it’s English terminology looks…
Read moreDown the Rabbit Hole – coding challenge
I’ve been looking to level up my Javascript coding skills, and I came across this “mock” coding interview with Dan Abramov by Ben Awad. I got the first question right (sortof) which asked about the difference between var, let and, const in Javascript. Short answer: Variables declared with var are hoisted to the top of the function scope. So if you declare a function with var like this: You will not get a compile error. But it will print “undefined” the first time. Because the var declaration is “hoisted” before executing so the function ends up executing something like this:…
Read moreFree Google Mail is going away. What are my options?
Google is ending it’s free email service with GSuite including GMail with custom domains. What is your strategy going forward? If you want to continue, it will cost you at least $12/user a month. If you have a small company with 10 people, that’s $1440 every year for email @yourdomain. Sure, you also get Google Docs and collaboration and file storage, but it’s enough for small business to reconsider. And if you don’t use their applications, it’s a hefty fee. So what are your options? Pay for Google Workspace $6 / $12 / $18 — per user, per month. This…
Read moreHow Tests Calcify Applications at Different Levels
Tests tend to make your code more resistant to change and refactoring. There are things you can do to alleviate this, but at the cost of complexity in the test code (or experience in the developer.) See: Tests are Great Calcifiers. This is true of tests at all levels — unit, api, ui automation. However, it’s actually inversely costly. Unit tests, which are the easiest to write, and most focused, are most often tightly coupled to the implementation — and makes refactoring without ignoring or rewriting tests harder. API tests are usually very tightly coupled to the API, making it…
Read moreInstall MacOS updates remotely via Command Line over SSH
Automating OS updates can be an important part of OpSec. Here’s a quick script to enable automatic OS updates on MacOS: See if Mac OS updates are installed by going to System Preferences > Software Updates > Advanced. You want “Install MacOS updates” to be checked. But you can also check this via the Command Line (when accessing remote devices via SSH, for example). % sudo defaults read /Library/Preferences/com.apple.SoftwareUpdate You should see a plist that includes: AutomaticallyInstallMacOSUpdates = 0; To enable “Install MacOS updates” % sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate AutomaticallyInstallMacOSUpdates -boolean TRUE And it should now be enabled, indicated by…
Read moreOptimizing test setup and cleanup for performance
There is an interesting post from Andrejs Doronins on LinkedIn about improving test performance: https://www.linkedin.com/posts/andrejs-doronins-195125149_testautomation-activity-6889222015509639169-duEW I replied and added my own comments below: Remember though, that execution time is trivial compared to development, maintenance, and debugging. So if you’re adding what seems like extra effort that slows down execution to have a clean environment and setup each time — the savings on reliable tests that pass consistently and find errors that tests that don’t “start from scratch” won’t find is so much greater. That said — you can be smart in your initialization. Things like initializing your database with common…
Read moreTonga volcano eruption felt in Fiji
I was shocked and saddened to hear of the destructive volcanic eruption in Tonga. And while international news has concentrated on possible tsunami effects thousands of miles away in Japan or California, my thoughts and prayers go out to the people of the South Pacific islands, especially Fiji where I lived and have friends. It looks like the impact on Viti Levu (at least) was not severe but there is little information about what has happened in Tonga where communication has been cut off. Lau group, being closer to Tonga has seen clouds of ash and debri. And the explosion…
Read moreSecurity. Quality. Simplicity.
Logging should be simple. Probably simpler than it is. The recent spate of Log4j vulnerabilities demonstrates that. What else in your tech stack is over-engineered or exposed? Your quality and security strategy should be: How can we simplify?Can we simplify without losing features?Will simplifying actually improve features and usability? #security #quality #simplify
Read moreFrozen New Year 2022
Looks like we’ll be welcoming the new year 2022 without water. Subzero temperatures and a well mean our water pipes have frozen tonight on December 31, 2021. It may be a few days before we can thaw them enough to get water running again.
Read moreAn Asynchronous Test Runner?
Here’s a conversation on LinkedIn talking about which programming language you should choose for a test framework — including comments about how automated tests are inherently synchronous (which I agree with) and why someone would write an asynchronous test framework in, for example JavaScript. https://www.linkedin.com/posts/vikas-mathur_qa-testing-testautomation-activity-6871687300267474944-1MUL Vikas Mathur Typically, programming language for test automation can be any language, irrespective of which language the developers are using. However, to allow for more and effective collaboration with the developers, using the same language as them might make sense. Of course, there might be situations where it does make sense to use a different…
Read moreI keep confusing Peter Dinklage and Peter Mayhew
Here is Peter Mayhew as Chewbacca in Star Wars: Here is Peter Dinklage as Tyrian in Game of Thrones: While there is some passing similarity (besides the name) — perhaps in the way they groom their hair, or maybe a bit in the way they walk. But Peter Mayhew is 7’3″. Peter Dinklage is 4’5″. Maybe I should get a tape measure. Anyone with a worse mixup?
Read moreOn Productivity: Ducks & Chickens
Sometimes you produce more. Sometimes you produce less. We got 2 ducks who didn’t start laying eggs until this fall. Since then, they’ve been laying pretty consistently. Here is their output for the past two days: The shiny eggs are from today. Every once in a while we get a giant — double sized — egg. It comes with two yolks. But today, we got this tiny little egg. Did I complain? No, I did not. I thanked her for the effort. We also have about 40 chickens. We average about 2 eggs a day from them. But they laid…
Read moreBlog Stats by Country and Over Time
I’ve recently started blogging regularly again, but it’s been several years since I gave it much attention. A recent blog redesign with a new theme — and *finally* a code formatting plugin that I like helps it to look better. I’m also taking time to put posts in the right categories and add meaningful tags to help people to search the content. Here’s a snapshot of the new simpler, prettier layout with post summaries on the home page: Looking back, I can see from my heyday in 2013-2014 where I averaged over 70,000 views, it’s slumped to an all time…
Read more
How to get cryptocurrency prices using Python (and various tools)
Here’s another post based on a question from Quora: Can I export the contents of an HTML table to Excel or MySQL via Selenium/Python? No, you can’t export a table from HTML to Excel or MySQL using Selenium with Python. But you’re in luck! You just asked the wrong question. It’s like if you had asked: “Can I build a bookshelf using my DeWalt Table Saw?” The answer is, of course, still no, but a reasonable person would say that your table saw is one of the tools you could use, but you’re also going to need a hammer, and…
Read moreA story of performance optimization and refactoring
Optimizing string to date format conversion in Go? Faster TIme Parsing in Go – a story in 3 acts – by Phil Pearl at Ravelin A great story of performance refactoring and profiling. But why go to the effort? Well, when you process billions of records in a NoSQL database and you made a decision early on to store dates in as a string because — why worry about typing when you’re prototyping? — The takeaway lesson from Ravelin is: Friends don’t let friends store dates in the database as strings Phil Pearl’s blog is often about performance tuning for…
Read more
Bitcoin doesn’t work – and what can we do about it?
Bitcoin doesn’t work. Two problems: Technical – Blockchain doesn’t scale.Social – Why should Bitcoin believers (and speculators) profit at the cost of everyone else. If Bitcoin was the solution then there would be no need of the FOMO. Everyone could adopt it when it is stable. But nobody interested in Bitcoin wants it to stabilize — because they wouldn’t profit. And alternatives — from Etherium to everything else — show both these flaws in Bitcoin. Bitcoin forks try to address issues with Bitcoin but primarily want to to a piece of the pie. And other crypto currencies do the same…
Read moreAWS CLI command completion in BASH
Sometimes you just have to do something simple in AWS — launch an EC2 instance, create a S3 bucket, run a lambda expression, insert some data into DynamoDB, etc. You could do this via the AWS Management console — but that means logging in and using the Amazon Web Services very user-unfriendly user interface. You could write a script that uses the Amazon SDK API via a library like Python Boto3. Or you can install the AWS CLI and run a simple shell script. But Amazon’s API is far from clear. And while the CLI is easier for simple tasks…
Read moreLoading…
Something went wrong. Please refresh the page and/or try again.