Skip to content
This repository has been archived by the owner on Aug 27, 2021. It is now read-only.

"groovy.log" appender created once for every execution #68

Closed
thchittenden opened this issue Jul 31, 2013 · 11 comments
Closed

"groovy.log" appender created once for every execution #68

thchittenden opened this issue Jul 31, 2013 · 11 comments

Comments

@thchittenden
Copy link
Contributor

With every execution of the plugin a new ConsoleAppender is created for the "groovy.log" class so after 5 executions of the plugin each message from a groovy script is logged 5 times.

If the initGroovyLog method from AbstractSoapUIRunner were stubbed in SoapUI(Pro)ExtensionTestCaseRunner and the console appender configured in soapui-log4j.xml I think that would fix it.

@redfish4ktc
Copy link
Owner

@thchittenden good catch. I didn't notice this.
Feel free to provide a pull request to fix this in this project (I won't have time to work on this before several weeks) or directly in the SmartBear/soapui repository

@redfish4ktc
Copy link
Owner

PR #69 provides a fix for both test and mock goals. Will be ok as 1st implementation.
Next we would have to fix this on other goals (in custom runners or directly in AbstractSoapUIRunner to avoid duplication accross runners)

@redfish4ktc
Copy link
Owner

Just realize that the problem can be reproduce by running integration test test-verify_goal/sucessfull_and_failing_projects

@redfish4ktc
Copy link
Owner

A user complained about this in the Soapui forum, see this post

@acommuni
Copy link

Would it be possible to have one global-groovy.log (and 2 other log files) per module ? In fact with multi-module maven project there is only one directory soapui/logs created. It would be nice to have one per module. The first module using soapui mock creates the log directory and then all other module are logging in it. It's difficult to analyse logs

@redfish4ktc
Copy link
Owner

@acommuni thanks for your feedback
This is a nice idea, I have also faced this issue.
Could you create a new issue about this subject because the current issue is not related to your problem (I will also update the documentation to explain the current limitation you have noticed)?

@acommuni
Copy link

It's done. Thank you.

@redfish4ktc
Copy link
Owner

ok, new issue is #98

@redfish4ktc
Copy link
Owner

When implementing this fix, also notifty users in the SoapUI forum

@redfish4ktc redfish4ktc added this to the 4.6.4.1 milestone Apr 5, 2014
@redfish4ktc redfish4ktc self-assigned this Apr 26, 2014
@redfish4ktc
Copy link
Owner

This is especially annoying when running with the test-multi goal as in this case, several projects are runned.
This should be fixed in 4.6.4.1

redfish4ktc added a commit that referenced this issue Apr 28, 2014
Add tests for both our plugin and the SmartBear implementation.
2 projects are runned. For the 2nd, groovy logs are appended twice.
redfish4ktc added a commit that referenced this issue May 12, 2014
Add tests for both our plugin and the SmartBear implementation.
2 projects are runned. For the 2nd, groovy logs are appended twice.
@redfish4ktc
Copy link
Owner

Merged into master, this issue is fixed in 4.6.4.1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants