Hi all,

after I read through the sample pages tipps & trick, I refactored all
functional tests I do on an "advertisement" object into four targets for
create read update and delete. CRUD.

I now do have the need to create an advertisement (and store the id of that
advertisement) before I go on with creating a "Campaign".

That's what I do:

   <target name="create">
       <ant antfile="usecases/CheckAdvertisements.xml" target="create" />
       <echo message="The ad id used for this campaign is ${adId}"/>

       <webtest name="Create campaign">
           &config;
           <steps>
               &login;

               &logout;
           </steps>
       </webtest>
   </target>

As you can see, I am calling the ad's create target to create an ad. Thsi
target will also save the ad id to an ant property, but I cannot access this
property as it is not returned to teh calling ant target in another build
file.

I could of course put all targets into one large build file, then I could
easily access all properties I ever created. But having one file for each
domain also makes sense from a logical point of view. I also would not like
to use an identifier different from id, (like name of ad, etc.) as id is
simply the only one that is unique. All others could appear multiple
times... and may cause strange problems.

Any thoughts on that?

Cheers\
Sven

--
Sven Haiges
[EMAIL PROTECTED]

Skype: hansamann
Personal Homepage, Wiki & Blog: http://www.svenhaiges.de

Subscribe to the Grails Podcast:
http://hansamann.podspot.de/rss

Reply via email to