During one of the tests, I got a list of items sorted via an api. At least that’s what I thought. From that list, I always extracted the first item because it was always the most recent one that was in the database.

During one of the tests, I got a list of items sorted via an api. At least that’s what I thought. From that list, I always extracted the first item because it was always the most recent one that was in the database.
Recently we had some problems in production. After the problems where solved, we had still a backlog of items we wanted to reprocess.
It is not that difficult to test an API. There are tools like postman that can do a lot for you. I do not use those tools for automated tests itself. I use them when I do some manual tests. For my automated tests, I use java or python. That is not the purpose of this post though.
In a previous blog I already explained how I did API calls with the python requests library. I also looked at setting up a new test environment with pytest. This post is about another pytest feature. The problem I want to solve is to send data over a REST interface. I do want that in a very generic way so that the data is separated from the actual test itself.
I discovered lately some things in java that I did not know yet. The switch statement in the java language switch in java has some weird things. First let’s create an example user story. I will write code afterwards.
My current application under test has an API with some dates. I need to calculate in some automated tests the days between two dates. Between the start and end date.
In this post, I am going to explain how to count the number of digits in a string with Python. I will explain how I extract the digits out Strings. This is common in the Data Science Domain.
My automated tests contains a lot of string manipulations. I do exercise a lot with programming. In this post I will solve a problem to distinguish between words and numbers. I will see if I can search for three words in python strings.
Sometimes we need to sort numbers. In this post I will give a solution a fictive sorting problem. I want to sort numbers with python. Sorting is a part of many tasks. It is useful to know how to use the sorting function in python.
Unitary operators in java are symbols that applies to a set of variables. The operator returns a result. A simple example is the one we know from mathematics. In a + b, the operator is the + sign.