citrusframework / citrus

Framework for automated integration tests with focus on messaging integration
https://citrusframework.org
Apache License 2.0
459 stars 137 forks source link

Allow test reports to access test context #279

Open criew opened 7 years ago

criew commented 7 years ago

To build some custom reports we need to access the test context during test reporting. We added testContext as parameter to the methods of TestActionListener before we found https://github.com/christophd/citrus/pull/32. However the outlined solution ("You can now access the test context on the test case object. As the test case is accessible in the action listeners you can get the test context there, too. I think this is less intrusive regarding API stability.") did not work for us. How can we access the test context from test case?

svettwer commented 6 years ago

@criew Sorry for the very late response but there was a lot of work to do and @christophd was managing everything on his own.

Have you found a solution for your problem or is this issue still a thing for you?

BR, Sven

ceazy79 commented 6 years ago

Hi Sven,

unfortunately the problem still exists.

We want to include Information from the test context in the report, e.g. the name of an endpoint or "process" that is dynamically resolved in the test and stored in the context. As already mentioned the proposed solution in #32 does not work. Mainly due to the fact that there is no access to the test context. It is only available in each method of the test case but not from the test case itself (maybe it was accessible but it was removed from the class and the information is outdated?).

It would be really helpful if you could change the TestActionListener as proposed in #32 and add the test context to the method signature or make the context available and accessible via the test case.

BR Chris

svettwer commented 6 years ago

Hi Chris,

thanks a lot for the update and the patience with this issue! I'll dive into #32 and have a look at what has been done so far. It doesn't feel like a big issue, but I'll need some time to evaluate that.

BR, Sven

svettwer commented 5 years ago

Hi!

I removed the READY label, as this issue requires some refinement.

BR, Sven