Is it just a case of round versus curly braces?
Julien Chambert wrote:
hello everybody,
i have a problem: I don't manage to handle my properties files.
here is my code
-------------------------------------------------------------------
test.xml
-----------------------------------------------------------------
<project name="FullSuite" default="testSuite" basedir=".">
<property name="test.xml" value="tests/test.xml" />
<target name="testSuite" >
<ant antfile="${test.xml}">
<property file="test_properties/Mytest.properties"/>
</ant>
</target>
</project>
-----------------------------------------------------------------------------
tests/test.xml
-----------------------------------------------------------------------------
<?xml version="1.0"?>
<!DOCTYPE project [
<!ENTITY config SYSTEM "config.xml ">
<!ENTITY testVolontaire SYSTEM "testVolontaire.xml">
<!ENTITY testRecrut SYSTEM "testRecrut.xml">
<!ENTITY verif SYSTEM "verif.xml">
]>
<project name="test" default="oneTest" basedir="..">
<property name="webtest.home" location="C:/canoo" />
<import file="${webtest.home }/lib/taskdef.xml"/>
<target name="oneTest">
<webtest name="$(test.Name)">
&config;
<steps>
<ifStep description="if volontaire: $( test.volontaire)"
test="$(test.volontaire)">
&testVolontaire;
</ifStep>
<ifStep description="else" unless="$(test.volontaire )">
&testRecrut;
</ifStep>
&verif;
</steps>
</webtest>
</target>
</project>
----------------------------------------------------------------------------------------------------------------
properties/MyTest.properties
--------------------------------------------------------------------------------------------------------------
page.volontaire=t.php
page.recrutement=t_recrut.php
page.test=test-form/test.html
test.Name=MyTest
test.volontaire=true
test.ResultOk=true
---------------------------------------------------------------------------------------------------------------
the problem is that it doesn't care of my properties. for example it
displaies:
[ifStep] INFO (com.canoo.webtest.steps.Step) - >>>> Start
Step: ifStep "if volontaire: $(test.volontaire )" (1/122)
it's the same for test.Name.
i'm pretty sure it doesn't come from the properties file because in
testRecrut.xml, a property page.volontaire is used and works fine.
I don't understand where is the problem.
thank you for your future answers
Julien Chambert
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest