chmelvvOccasional ContributorJoined 9 years ago11 Posts2 LikesLikes received1 SolutionView All Badges
ContributionsMost RecentMost LikesSolutionsRe: Chinese Standard Characters I try to put here all needed information how to switch on "Native Look and Feel" to see my Chinese test data. OS: Windows 10 ReadyAPI: 2.1.0 I found soapui-settings.xml in my User folder C:\Users\... 1) You need to add <con:setting id="UISettings@native-laf">true</con:setting> e.g. after some another UISettings option. 2) Restart ReadyAPI Re: "Unexpected end of file after null" error while execution REST test case with assertions. Another root cause found: In one REST testStep I use properties from previous disabled testStep. SoapUI try to parse null file of previous testStep and get error. I deleted it and have no errors now. Re: "Unexpected end of file after null" error while execution REST test case with assertions. Deepali wrote: There is a setting in Test case options with check box as "Display OK Result". If I unchecked it, I am able to see request and response. Sorry, where is this settings? I can not find it. Re: "Unexpected end of file after null" error while execution REST test case with assertions. I found solution to uncheck "Search preceding TestSteps for property values" in TestCase options. But, from another hand, this settings can be needed sometimes. Re: Not able to generate load properly May be it is too late to answer, but I had the same error. It was because I have a lot of included in each other DataSource/DataSourceLoop structures and in one of DataSourceLoop corresponsing DataSource parameters was set to old non existing step. Re: How to modify testStepResult? While deep learning Java I found another solution, but it risky because you can modify testStepResult as much as you can and possibly lost test consistency. Solution is Java Reflection API in general, but I use version from apache commons library: In Events window: import static org.apache.commons.lang3.reflect.FieldUtils.writeDeclaredField; writeDeclaredField(testStepResult, "messages", ["Hiiiiiiiiiiiii!"], true); log.info testStepResult.getMessages()[0] Code modify private field "messages" with List<String> type in testStepResult object. Output: <...> :INFO:Hiiiiiiiiiiiii! Re: How to modify testStepResult? Hi Tanya, thanks for quick reply! I chose following solution: I used event listener TestRunListener.afterStep and inside it after each step append needed information into TestSuite property, then in test suite TearDown script wrote it to needed file. 1) TestSuite`s Setup Script: To clean data from previous run. testSuite.getTestCaseByName("testCaseName").setPropertyValue("logFile", "") 2) Event Listener Name: TestRunListener.afterStep Event: TestRunListener.afterStep Target: Rest request (inside testCaseName test case) if ( "FAILED".equals( testStepResult.getStatus().toString() ) ){ def URL = testStepResult.getMessageExchanges()[0].getProperty("URL") def parameter1 = context.expand( '${DataSource#<SOME_PARAMETER1>}' ) def parameter2 = context.expand( '${DataSource#<SOME_PARAMETER2>}' ) def logFile = testRunner.getTestCase().getProperty("logFile").getValue() + URL + " " + parameter1 + " " + parameter2 + "\n" testRunner.getTestCase().setPropertyValue("logFile", logFile) } 3) TestSuite`s TearDown Script: File reportFile = new File("report.txt") def logFile = testSuite.getTestCaseByName("testCaseName").getProperty("logFile").getValue() reportFile.write(logFile , "utf-8") How to modify testStepResult? Hi, I use log processing script (as TestSuite tear down script) used for a lot of our projects. It gets information (like request URL) from testStepResult. But I need to add more information unique for every test step run into this object testStepResult. But it seems has only get... methods. Is it possible to add custom fields and values into testStepResult object? SolvedRe: BUG! exception in phase 'semantic analysis' in source unit I my situation problem was that I try to import groovy lib script from <soapui>\bin\scripts\ folder which includes import of another jar lib which was not exist in C:\Program Files\SmartBear\ReadyAPI-1.8.5\lib folder. When I put appropriate jar file to that folder - problem disappeared. Re: Compilation errors in external groovy libraries I my situation problem was that I try to import groovy lib script from <soapui>\bin\scripts\ folder which includes import of another jar lib which was not exist in C:\Program Files\SmartBear\ReadyAPI-1.8.5\lib folder. When I put appropriate jar file to that folder - problem disappeared.