Contributions
Tear down script at project level does not get executed when execution is done from java code
I have a testSuites tear down script at project level . I am executing my code from java as below: SoapUITestCaseRunner testCaseRunner = new SoapUITestCaseRunner(); testCaseRunner.setProjectFile(path); testCaseRunner.run(); The execution happens but the tearDownscript at project level does not get executed. Is there any solution to this ? or a workaround to explicitly invoke the project level teardown scripts from soap ui api using java? --I can move my script to individual suite teardowns but i am also capturing projetc level execution details so as a workaround is it possible to get the project level runner from testSuite Level to get details like timeTaken and Status etc at project level?1.2KViews0likes1CommentRe: Clone test Step to test case using java in soap ui
basically i need a way to insert or clone an existing test step to another test case programmatically. com.eviware.soapui.impl.wsdl.actions.teststep.CloneTestStepAction CloneTestStepAction cloneTS = new CloneTestStepAction(); cloneTS.perform((WsdlTestStep) step, new String(step.getName())); The code above ia m trying is not working . any ideas here?1.4KViews0likes0CommentsClone test Step to test case using java in soap ui
Hi I am trying to clone all test steps in all test cases in a suite to a particular test case in the same project. I am reading the entire list of test cases and their steps in a suite, saving these steps in a list. Now i want to add or clone these steps to a specific test case . An ideas here on how to proceed now ?nmrao any champion advice ? WsdlProject project = new WsdlProject(path); // get a list of all test suites on the project List<TestSuite> suiteList = project.getTestSuiteList(); for (int i = 0; i < suiteList.size(); i++) { TestSuite suite = suiteList.get(i); String suiteName = suite.getName(); System.out.println("Test suite - " + suiteName + " , Enabled :" + !suite.isDisabled()); // empty List for all test steps from Test case List<com.eviware.soapui.model.testsuite.TestStep> tsToBeAdded = new ArrayList<TestStep>(); if (suiteName.equals("Sometestsuite")) { // read the test cases in each suite List<com.eviware.soapui.model.testsuite.TestCase> caseList = suite.getTestCaseList(); System.out.println("test cases in suite - " + caseList.size()); for (int k = 0; k < caseList.size(); k++) { com.eviware.soapui.model.testsuite.TestCase testCase = caseList.get(k); System.out .println("Test Case - " + testCase.getName() + " , Enabled :" + !testCase.isDisabled()); // dont pick up load test if (!testCase.getName().equals("LoadTest")) { if (!testCase.isDisabled()) { // find all test steps List<com.eviware.soapui.model.testsuite.TestStep> stepList = testCase.getTestStepList(); System.out.println("test steps in test case - " + stepList.size()); for (int j = 0; j < stepList.size(); j++) { com.eviware.soapui.model.testsuite.TestStep step = stepList.get(j); System.out.println("Test step added - " + step.getName() + " , Enabled :" + !step.isDisabled()); tsToBeAdded.add(step); } } } } // check if test step list not empty if (tsToBeAdded.size() > 0) { // add the steps to Load test test case com.eviware.soapui.model.testsuite.TestCase loadTestCase = suite.getTestCaseByName("LoadTest"); for (TestStep testStep : tsToBeAdded) { System.out.println("Test step List - " + testStep.getName()); //TODO - somehow clone or add these test steps to this test case } } } }1.4KViews0likes2Commentsorg.apache.xmlbeans.XmlException: error: Unexpected end of file after null soapui bamboo
I have a bamboo plan which utilises a junit test to call SOAP UI tests. while trying to load the soap ui project file via the SOAP UI API like below: String path = "something"; SoapUITestCaseRunner testCaseRunner = new SoapUITestCaseRunner(); testCaseRunner.setProjectFile(path); i am getting an exception "org.apache.xmlbeans.XmlException: error: Unexpected end of file after null" The soap ui project runs fine when i run it from the SOAP UI interace itself. This used to work just fine some time back, i havent made any changes to any parts of the code. Except i keep seeing the following lines now in my soap ui project file: <con:content><![CDATA[<wsdl:definitions targetNamespace="something.com" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="something.com" xmlns:intf="something.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" Any ideas on what is going wrong here?3.5KViews0likes2CommentsRe: how to read request and response between redirects in SOAP UI
nmrao I am making a call which will be redirecting 3 times automatically. so sequence is : - original request -redirect1 -redirect2 -redirect-3 - final response I can only access thefinal response. I want a solution to access the reDirect1 or reDirect2 responses, can you suggest something?1.7KViews0likes1CommentHow to enable custom log for SOAP UI for each run
Hi , I enabled Http Logging by adding the following to soapui-log4j.xml : <appender name="FILE-HTTP" class="org.apache.log4j.RollingFileAppender"> <errorHandler class="org.apache.log4j.helpers.OnlyOnceErrorHandler"/> <param name="File" value="${user.home}/.readyapi/logs/ready-http.log"/> <param name="Threshold" value="DEBUG"/> <param name="Append" value="true"/> <param name="MaxFileSize" value="5000KB"/> <param name="MaxBackupIndex" value="50"/> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%d %-5p [%c{1}] %m%n"/> </layout> </appender> <logger name="org.apache.http.wire"> <level value="DEBUG"/> <appender-ref ref="FILE-HTTP"/> </logger> This works when I run the test and logs all http information to the log at the location. Issue : 1) This custom log now disables the http log in the SOAP UI Console 2) The log does not get created at the SOAP UI project folder , only at the given path. What is the config change required to get the custom log at the project root level when run from the test runner?Re: How to Access Htttp Log from SOAP UI using the soap ui API
nmrao I am looking for a solution to read the http log when the soap ui GUI is not used. the SoapUi log only tracks the step called in the logs, the http traffic with details is not available there. My basic problem is that I want track sessions during redirects , to which the only workaround I see in SOAPUI is to read the the http log in the SAOP UI console. I need a way to capture this when the SAOP UI GUI is not used.1.5KViews0likes0Comments