This is one of those questions which has multiple valid answers, as well as being a common problem for test automation engineers.
The approach you take should be influenced by your knowledge of your user base:
Do you know which configuration settings your users use?
Are there known configuration settings used by your largest customers?
Are there common ...
Like software developers create a software architecture describing how to software is built from a very high level perspective, you can do the same from a testing point of view.
In my cases (involving software testing), the test architecture contains many elements which are also present in the software architecture diagram.
It differs from the software ...
Test Architecture Design
Determine what to do in each of the 4 agile testing quadrants:
Determine how to structure your test pyramid (representing the volume of tests) with more unit tests on the bottom and less exploratory testing at the top
Lots of Unit Tests
Your Regular Expression Extractor configuration is a little bit incorrect:
You should change "Field to check" of your Regular Expression Extractor to URL
You should amend your Regular Expression to something like: /en/book/confirm/(.*)
In your current setup your Regular Expression looks into the Response Message (which is OK for HTTP Status Code 200) and ...
Your code would be cleaner if you use the Selenium API and search inside each element:
List<WebElement> articles = driver.findElements(By.xpath("/html/body/div/div/div/div/div/div/div/div/article"));
List<String> articlesText = articles.stream().map(
Your code logic seems okay but there are some parts which need to be changed.
First when you want to search a non static value in dynamic id, searched value should match correct pattern so your pattern can not find expected span , this code line should be changed to:
Comment : I hope there is not any span which ...
That "stable state" is a necessary concept for test automation (I usually refer to it as the "idle state"). However, it is important to try to run the tests in a variety of configurations and not just the single stable one. Here are some ideas that I hope may be helpful:
I try to write my scripts such that they return to the idle state after each test run.