6 messages in com.canoo.lists.webtestRe: [Webtest] How to add external pro...
FromSent OnAttachments
Paatsch, Bernd14 Dec 2005 13:04 
Forsyth, Steven A14 Dec 2005 13:14 
Forsyth, Steven A14 Dec 2005 13:17 
Paul King14 Dec 2005 13:42 
Lothar M�rkle15 Dec 2005 02:41 
Paul King16 Dec 2005 20:24 
Subject:Re: [Webtest] How to add external property values?
From:Lothar M�rkle (loth@netpioneer.de)
Date:12/15/2005 02:41:59 AM
List:com.canoo.lists.webtest

Hi,

On Thu, Dec 15, 2005 at 07:42:48AM +1000, Paul King wrote:

Currently <property file="WMM_Login.properties"/> has to go outside the <testSpec> ant task.

for quick and dirty anting I wrote a ultra-simple wrapper and added it to the wiki: http://webtest-community.canoo.com/wiki/space/AntWrapper

This step will allow: <webtest> <invoke/> <antWrapper> <whateveranttaskyouneedhere/> </antWrapper> <setInputField/> ... </webtest>

This is just a shortcut solution to get something working, there are some questions left:) -how to exchange Data with ant-Task, perhaps set the webtest response from a property? -how to disallow nesting of webtest within antWrapper?

I think the main purpose is for workarounds until there is a specific webtest step for the problem.

regards, lothar

Paul.

Paatsch, Bernd wrote:

I try to get my first test case to work however have some difficulties to load input values from an external property file.

Executing my scripts I receive following error:

BUILD FAILED /home/Automation/WebTest/WMM/WMM_TestCase.xml:27: Task must be of type "Step": property at /home/Automation/WebTest/WMM/common/WMM_Login.xml:1: is of type org.apache.tools.ant.taskdefs.Property

I have following files: WMM_Login.properties, WMM_Login.xml and WMM_TestCase.xml

WMM_Login.properties: szLoginName="9208" szLoginPassword="0000" szLoginLanguage="us"

WMM_Login.xml: <property file="WMM_Login.properties"/>

<setinputfield name="txtLoginForm" value="${szLoginName}" description="Login name or ID" /> <setinputfield name="pwdPasswordForm" value="${szLoginPassword}" description="Login password" /> <setselectfield name="sltDefLanguage" value=${szLoginLanguage}" description="Sets the language" /> <clickbutton label="Login" description="press the login button to invoke the java script" /> <verifytitle text="Mailbox Manager" description="verify if loggin was successful based on title" />

WMM_TestCase.xml <?xml version="1.0" encoding="iso-8859-1" standalone="no" ?> <!DOCTYPE project SYSTEM "./common/WebTest.dtd" [ <!ENTITY WMMConfig SYSTEM "./common/WMM_Config.xml"> <!ENTITY WMMTaskdef SYSTEM "./common/WMM_Taskdef.xml"> <!ENTITY WMMOpenLoginPage SYSTEM "./common/WMM_OpenLoginPage.xml"> <!ENTITY WMMLogin SYSTEM "./common/WMM_Login.xml"> ]>

<project name="WMM_Menu" default="WMM_Main"> &WMMTaskdef; <ant antfile="./common/WMM_Prepare.xml" />

<target name="WMM_Main"> <testSpec name="open the WMM_Main page"> &WMMConfig; <steps> &WMMOpenLoginPage; &WMMLogin; </steps> </testSpec> <ant antfile="./common/WMM_WriteReport.xml" /> </target> </project>

Any idea what I need to do to fisx this problem?

Thanks, --Bernd

*/***************************************/* */Bernd Paatsch/* */Software Quality Assurance Engineer/*