You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, in the RESTestLoader class, the spec attribute is initialized in the createGenerator method. This means that, for example, when generating a report with Allure, on tests that have already been generated and executed, it is necessary to create a generator. This is because the createAllureReportManager method uses the spec attribute to find authentication property names (if any).
In a nutshell, what would be expected when generating a report with Allure would be:
It is proposed to modify the initialization of the spec variable so that it is done in the readProperties method instead of createGenerator. This would improve decoupling, allowing all attributes to be defined once the property file is read, rather than having some, as in the case of spec, initialized in other methods.
Current code
You can see how the createGenerator method is in charge of initializing the spec attribute:
Thank you very much for your contributions and suggestions. We have carefully reviewed the proposed changes and have incorporated them into the project in the latest commit. We appreciate your time and effort in improving the code and helping the project continue to grow.
If you have any other suggestions or find any further details that could be improved, please feel free to share them. Thanks again for your support!
Problem description
Currently, in the
RESTestLoader
class, thespec
attribute is initialized in thecreateGenerator
method. This means that, for example, when generating a report with Allure, on tests that have already been generated and executed, it is necessary to create a generator. This is because the createAllureReportManager method uses thespec
attribute to find authentication property names (if any).In a nutshell, what would be expected when generating a report with Allure would be:
However, to generate a report with Allure we must do it in the following way:
Proposed change
It is proposed to modify the initialization of the
spec
variable so that it is done in thereadProperties
method instead ofcreateGenerator
. This would improve decoupling, allowing all attributes to be defined once the property file is read, rather than having some, as in the case ofspec
, initialized in other methods.Current code
You can see how the
createGenerator
method is in charge of initializing thespec
attribute:Proposed code
The initialization of the specification would be done only once by reading the properties of the file where they are contained:
This could eliminate the operation of loading the specification in the
createGenerator
method:The text was updated successfully, but these errors were encountered: