I'm using jmeter and performed the following procedure:
- I performed the recording of a script in a user registration feature;
- I extracted the ViewStates (since it is a feature with pages in web flow);
- I ran the test;
When recording the test, the user was saved normally in the database. I deleted the user and ran the recorded script. There were no errors in the script, but the user was not saved. Can someone give me a hand?
Check other tables
It is possible that the functionality in question writes data to other table(s) and there is some record. The system, seeing that something already exists, does not record the user.
Another possibility is that an error is occurring, but your test is not catching it.
It would be interesting to look carefully at the return log of each request.
If the system has some kind of cache, it may have a version of the user in memory and think it already exists.
This scenario is quite strange, but it can happen depending on how the system manages its entities. Incorrect logic using Java's JPA API can lead to this type of problem.
It also sometimes happens that we look at the wrong database or table.
When in doubt, check with the person responsible for the environment if there have been any changes. It could be that someone has configured the system to use another instance of the database server.
Another possibility is that the user was saved during the second test, but you couldn't find him because the ID or some field used in the query criteria changed.
This is common to happen if there are fields generated automatically by the system.
I have tried to list above the most common problems that occur in scenarios where there seems to be no reasonable explanation.
However, the problem can lie in both the most basic misunderstanding, such as looking at the wrong bank, as well as the more "obscure" details of the system's architecture.
If none of this helps you, it remains to work together with the system developer, who can debug the exact behavior of the program. Remembering that in situations like this, it is essential to detail the procedure for reproducing the problem.