Contributions
Re: Issue with Project and TestSuite Listeners in old style plugins
Hi, I finally managed to find the root cause. - TestSuiteRunListener will only be invoked when we run all or more than onetest case under a TestSuite. When testing my code, I selected only one test case under a TestSuite which caused the system to skip the listener action - Similarly, ProjectRunListener will be invoked when we run all or more than onethe TestSuites under a project Thanks for your time looking into this Regards, Krishna1.6KViews0likes0CommentsIssue with Project and TestSuite Listeners in old style plugins
Hi All, I am using SoapUI 5.3.0 and created a pluginto perform some functionality. I am facing an issue adding the required listener to triggerthe action. -Adding theTestRunListenerinvokes listenerClass successfully when running tests either from the TestCaseEditor window or the LaunchTestRunner window( or TestRunner.bat)- Working as expected and triggered for each TestCase - The TestSuiteListener(overriding beforeRun) and ProjectRunListenerinvokes listenerClasssuccessfully when running tests from the TestSuiteEditor window (pressing green play icon and for each TestSuite) but does not work when tests are ran using LaunchTestRunnerwindow(or TestRunner.bat). Listeners.xml configuration <tns:soapui-listeners xmlns:tns="http://eviware.com/soapui/config"> <tns:listener id="SoapUIProjectPropertiesConfigListener" listenerClass="test.listeners.SoapUIProjectPropertiesConfigListener" listenerInterface="com.eviware.soapui.model.testsuite.TestSuiteRunListener" singleton="true"/> </tns:soapui-listeners> Listener class package test.listeners import com.eviware.soapui.SoapUI import com.eviware.soapui.model.support.TestSuiteRunListenerAdapter import com.eviware.soapui.model.testsuite.TestSuiteRunContext import com.eviware.soapui.model.testsuite.TestSuiteRunner class SoapUIProjectPropertiesConfigListener extends TestSuiteRunListenerAdapter { @Override void beforeRun(TestSuiteRunner testSuiteRunner, TestSuiteRunContext testSuiteRunContext) { SoapUI.log("Hi there") } } Is this a known issue or problem with my configuration ? Your help is appreciated. Thank you KrishSolved1.7KViews0likes3CommentsRe: Known limitations of custom groovy classes packaged in a JAR file
Thanks Rupert. The logging solution providedis what I am after Regarding the question 1, - I added a file in my Groovy project witha specific path. - The Jar artifact is built and placed in "ext" folder of SoapUI - Ran the testcase using the function in Jar - The function code haven'tfound the file (unable to get that path) - This error/exception is not propagated to UI but a default value is returned based on the functions return type e.g. null With the log functionality working now, I can add some exception handling in Groovy library which will print any errors to the SoapUI log. Regards, Krish2.1KViews0likes0CommentsKnown limitations of custom groovy classes packaged in a JAR file
Hi, I created a custom Groovy library to store some reusable functions and used them in the SoapUI tests. I observed a couple of limitationswith this approach - When an exception occurs in a function of the library, system does not show any details in output but will show the error log specific to groovy steps in the SoapUI test case - Console output cannot be printed to SoapUI "Script Log". e.g. using "println" in the groovy class If you tried developing a library for using it in SoapUI, could you pleaseprovide your inputs and list any limitations you found. Thank you Regards, KrishSolved2.2KViews0likes3Comments