I am currently working on a project and I am looking for a way to automate the programming system. In a nutshell, the project works in this way: some operations on the frontend (www site) call and generate logs (with a lot of content) and now I analyze the logs manually but I would like to automate this process.
I have a question for you how to approach this process in the simplest way, I am currently learning java and for now, I wrote scripts in selenium webdriver + java and cucumber. And here is my question whether using cucumber I could also add assertions to verify logs? if so, how?
At the moment I have three ways to verify my logs:
- after performing some operations on the website, reading a file with logs from the location on the C drive of my computer and verify if there is a corresponding string in the file.
- Performing all operations on the frontend and generating full logs, and then comparing them with the template file with logs (one that is tested manually and it is certain that the entire page functionality works correctly)
- I am also thinking about such a solution to download a text file in time eg. in a loop such as 20 seconds and check if there is the desired string in it and then in the cucumber is considered assertion.
I am asking for advice from more experienced colleagues.
For all the tips, I will be very grateful!
Greetings, Chris