This post will serve as a quick tutorial for using pytest command-line options. Anyone who is new to pytest will benefit from this article. Pytest comes with many useful command-line options right out of the box. When I started learning pytest, I had to search through a lot of material available on the official pytest website as well as other […]
Exploring pytest command line options
Debugging in Python using pytest.set_trace()
Debugging the code in Python is a bit tricky when compared to other programming languages. Most of us use print statements in the code at multiple places to print the variable values and figure out the problem. Or sometimes use time.sleep() statements to pause the python program to check what’s going on in the code. Recently we started tracing our […]
Qxf2’s automation testing framework uses Python 3
We have updated our open-sourced GUI automation testing framework to use Python3. This update was due for a long time. We have had a lot of requests from people asking for our framework to use Python3 and we finally found the bandwidth needed to migrate to Python3. We will also no longer support Python2. If you already use our framework […]
Sending images and log messages to ReportPortal
Problem: There is not much information on how to send or attach images to ReportPortal Why this post? We started using ReportPortal for reporting automation test results. Along with the test results we also need to send log messages and images/screenshot to ReportPortal. These are useful artifacts which help people monitoring them check the success and failure reasons and take […]
ReportPortal integration with pytest and pytest markers
Problem: If QA wants to make a difference with their testing and influence decision-making, we should convey our test results clearly. Hence test reporting becomes an important part of testing. There are several test reporting tools available and recently many AI based test reporting tools are getting popular. Integrating with these reporting tools is useful. In this post, we […]
View a Docker container’s display using VNC Viewer
It is useful to be able to view your Selenium tests running within a Docker container. This can help you to debug issues better and have more confidence in your tests. We found the ability to look at the tests especially useful when performing some complex actions like drawing, dragging, dropping, etc. To view the Docker container’s display, we setup […]
Auto-generate requirements.txt file using pipreqs
At Qxf2, we love Python. We use Python on multiple projects and as per our requirements, we install multiple modules. But, I found it difficult to create a requirements.txt file for specific projects manually. So I searched for a tool/technique to generate a requirement.txt file. I come across the pipreqs package, which generates a requirement.txt file based on the import […]
Post pytest test results on Slack
Slack is a really popular instant messenger among our clients. It has very nice integration capabilities (Slack bots) that we use with our CI setup. At Qxf2, we sometimes encourage (and enable!) developers to run automated GUI and API tests against their local builds. So, we decided to enhance our GUI automation framework to post the test result of a […]
Better pytest failure summaries
We, at Qxf2, are really liking pytest. It is the most Pythonic test runner we have come across so far. We started using it with our GUI automation. We realized one thing very quickly – pytest’s reporting capabilities are configured to suit unit testing. We needed to reconfigure pytest’s reporting to suit our GUI automation framework. It was also hard […]
pytest: Cross browser, cross platform Selenium tests
We showed you how to run tests on BrowserStack using pytest in our previous post – pytest and Browserstack. We had an example test and ran it across one browser from the command line argument. What if we need to run it across different browser versions, platforms and platform versions? Why this post? pytest responds really well when we run […]