A WebSocket is a standard protocol for two-way data transfer between a client and server. It is supported by all modern browsers. Why this post? My know-how of WebSocket connections was very limited. When I had to test an application which involved a WebSocket connection, I couldn’t find much information on how to go about testing it. It took me […]
WebSocket testing
Pytest-xdist: Run tests in parallel
Problem: How do you run tests in parallel with pytest? We have begun using pytest as our test runner at most of our clients. At one client, our tests are triggered by CircleCI and run on BrowserStack. Our GUI automation suite grew in size and was starting to take a long time to run against a vast combination of OSes […]
How to investigate pytest-warnings
We recently integrated pytest, a Pythonic test runner, with our framework. After the tests were executed, pytest threw a couple of warnings. We decided to share our findings as the Google search results to debug the pytest-warnings were not quite revealing. Solution: Use thepy.test -r wcommand to gather additional information about the warnings. Reporting in pytest: The py.test command runs […]
Urllib’s urlencode: The weird case of %22 and %27
When I was doing some API testing using Python Mechanize, I struck an internal server error. I tried to find the root cause of the error and I realized that Python’s urllib is doing something weird when encoding strings. It is replacing double quotes with single quotes. I spent more than hour to debug this issue before I realized what […]
Python+Selenium+pytest tutorial
One of our clients recently introduced us to a really nice, Pythonic test runner called pytest. Thank you Vachan Wodeyar of Kahuna, Inc. for introducing and helping us get started with pytest! Our GUI automation framework lacked a good test runner. So it was tough to run all our tests with just one command. It also made reporting results […]
Get started with SQLite and Python
There are times when we repurpose our automated checks to scrape information off the pages it visits. This can happen when you are using automation to explore a product, looking for patterns in client data, analyzing production data to spot patterns, etc. Storing the scraped data can be tricky. Approaches to storing the scraped data range between two extremes: a) […]
Setup Locust (Python/load testing) on Windows
I recently used Locust, a load testing tool that lets you write intuitive looking Python code to load test your web applications. I did not follow Locust’s install guide and instead just tried a ‘pip install locustio’. I ended up running into some issues that were not easy to Google about. So I thought I would document the problems I […]
Get Set Test an iOS app using Appium and Python
It has been more than a year since I wrote my first blog on mobile automation using Appium for Android applications. There were many requests to come up with a similar blog for iOS applications. But due to time constraints I couldn’t get to it. But as they say, better late than never! I finally have a guide to help […]
JavaScript evaluate() and XPaths
I recently used a neat solution that involved JavaScript evaluate() and XPaths as part of an automated GUI check. I am good with Python and writing XPaths for locators but not so good with JavaScript. I needed to locate an element in the DOM and then change a specific attribute. The solution was simple enough that I did not have […]
Obtaining BrowserStack screenshots and video links
At Qxf2 we use BrowserStack to run our automated checks against different browsers. BrowserStack is a cloud-based, cross-browser, testing tool that takes away the pain of maintaining a physical lab and saves us a lot of time. Why this post? BrowserStack is a great tool to execute your automated tests. However BrowserStack is not a good tool to report the […]