I’m refactoring the tests regarding the Manage Appointment Blocks module since they are ignored, namely
ManageProviderSchedulesTest.java, DeleteAppointmentBlockTest.java and AddEditAppointmentBlockTest.java.
As I can see they are redundant, if we analyze the test method for each one of them, you notice that they are doing the same thing: create an appointment, edit it and delete it.
ManagerProviderSchedulesTest appears to be the most comprehensive of all tests, my advice is to keep only this test and delete the others. We would benefit in many ways: easy maintenance, reduction of the overall testing execution time, etc.
Let me know what you think of. In the meanwhile, I’ve also modified (minor modification)
AppointmentBlocksPage.java because it wasn’t aligned with module state of the art (e.g, wrong locators)
Thank you in advance
Having one class for the three tests is fine. Though i would have a separate method for create, edit, delete. That way, if a test fails, i have an answer from the method name regarding whether create, edit or delete is the one which has a bug.
Just a comment about [quote=“domenico, post:3, topic:10041, full:true”]
I agree with you, although we slightly deviate from the advice “In general each class should contain one test method”.
[/quote]
The reason is that they can be easier run in parallel as each test class can be run in a separate fork.
Well, guys I din’t have the time to work on the tests.
However, I’ll remove the redundant test, but I’ll keep the principle of having one test method in the test class.
Thank you both.