why can you only use it inside webtest <steps>? Normally you can use it at any place once groovyScript is defined.
You say that the property was not resolved. Does it means that nothing is loaded by the custom step? Can you add debug output to it? Cheers, Marc. -- Blog: http://mguillem.wordpress.com Mart Toom wrote: > Hi, > > Can anyone please help with setting up property files with UTF-8 charset. > > In one thread (How to set the charset UTF-8 for reading prop files, > 15.11.2007) in this list Marc already gave some guidelines how to do this. > But when I tried this solution, I didn't have any success. > > Where exactly I have to put following groovy script suggested by Marc G: > > <groovyScript> > class MyProperty extends org.apache.tools.ant.taskdefs.Property > { > String encoding > protected void loadFile(File file) > { > def text = file.getText(encoding) > def lines = text.split("[\\n\\r]*") > lines.each { > if (!it.startsWith("#")) { > def pos = it.indexOf("=") > if (pos > 0) { > addProperty(it[0..pos], it[(pos+1)..-1]) > } > } > } > } > } > project.addTaskDefinition "myProperty", MyProperty > </groovyScript> > > Only place where ant didn't complain about it was inside webtest <steps> > tags. > And after groovy script I defined > <myProperty file="${propertiesDir}\test_001.prop" encoding="UTF-8"/> > > But then again, the property value was never resolved. > > And I'd like to used this property file inside all my testcases, not > only in one case. > > > Thanks in advance for any hint, > > Mart > _______________________________________________ > WebTest mailing list > [email protected] > http://lists.canoo.com/mailman/listinfo/webtest > _______________________________________________ WebTest mailing list [email protected] http://lists.canoo.com/mailman/listinfo/webtest

