allure-framework/allure-java

Reorganization of AllureLifecycle

Joao620 opened this issue · 3 comments

Is your feature request related to a problem? Please describe.
Just a developer experience

Describe the solution you'd like
Reorganization of io.qameta.allure.AllureLifecycle class. Separating some of his functions

Describe alternatives you've considered
Something like

io.qameta.allure.allureLifecycleFunctionality/
├─ AllureLifecycle.java
├─ AttachmentFunctions.java
├─ StepsFuntions.java
├─ EtcFunctions.java

Where

  • AllureLifecycle: would have his attributes with the default modifier ( neither private or public ), so could be accessed from the Functions. And some methods that make sense still be there
  • Functions: implements some functions that are similar, still using the lifecycle attributes without modifications

Additional context
I want to create a attribute in the AllureLifecycle, but it already have very specific ones, and didn't want to throw a random one there. I could have a storage class in the internal package, but this functionality and attribute is closely related to the steps functionality, and wanted to be close to them

But after all this is just a idea i had, and wanted some feedback. Don't know if is going to the a change too big. Or if the problem is too specific for me

baev commented

Could you please describe the issues you're experiencing in the first place?

I want to make a option to afterstep hook attachments be in the attachment part of the step. I've tested adding the Attachment object in stepResult when running the hook, and it worked. The problem is that i need to store the stepResult object to be used after in the hook, but didn't found space to do it. The better option was to make o object just for this inside the internal package, but seems overkill. If all the steps functions was in one file, making a attribute inside this class would be better, i think

But again, I've just throwed this to see if was of the interest of the community this refactoring. If not i am going to just open a draft pull request to work out the better way to handle this

Closed due to low interest