Contributions
a way to change log file at runtime
hallo, in my project (with soapui 2.5) I needed to have in a certain directory a different log file for each test case run, instead of always writing to soapui.log file (set in the soapui-log4j.xml). since I wasn't able to find a way to do it in the forum, I'd like to share it here: 1) I wrote a listener (a java class) for the test case (as described in the documentation) 2) in the method beforeRun I put these lines: RollingFileAppender rfa = (RollingFileAppender) Logger.getRootLogger().getAppender("FILE"); rfa.setFile(yourdir + yournewlogfile); rfa.activateOptions(); yourdir is a directory set a runtime (you can write it as a TestSuite property and read it from the listener) yournewlogfile is set at runtime in a similar way 3) I put in the method afterRun these lines: RollingFileAppender rfa = (RollingFileAppender) Logger.getRootLogger().getAppender("FILE"); rfa.setFile("soapui.log"); rfa.activateOptions(); *********************** hope this could be of help to someone alessandro bytheway: I was (and I am still ) new to log4j, so if there is anyone with good hints please share!1.4KViews0likes0CommentsRe: run testCase & property transfer problem
hi Ole, this is what I did: 1)cloned a test suite within a project 2)cloned a test case, say "a". this test case (has a step which) was already pointing to another test case, say "b" 3) modified "b" (introduced a Case property) and changed its name 4)modified the "a"-clone (introduced a Case property) and changed its name after reopening, the modified "b" was still pointing to the original "a", in the other - original - test suite (I m sorry I have just realized I wrongly reported in my previous message that the original "b" was in the same suite) a note: the original "a" case in the cloned suite was not intended to be used, indeed it did not work after modifying "b": was just there for reference and would have been deleted later. hope this helps regards alessandro1KViews0likes0Commentsrun testCase & property transfer problem
hi, got this problem with both free e pro (trial) 2.5: when I open a project from file, 1) the runTestCase step is no more properly configured (the target testCase is different from the one I chose, though it still belongs to the same suite. moreover, the now-targeted case is the original version of the copy I'd like to target now, but with different properties) 2) the property transfer just before the runTestCase step not only doesn't point to the correct property in the runTestCase step (which I guess is right, after point 1)), but also doesn't get in input any property of the Case step it belongs: these properties are still present in the case. everything's working right if I do not exit, but testRunner: it gives me the message "error performing transfer - missing source property" , which it seems to me related to 2). any hints? thanks in advance al2.5KViews0likes5Comments