Biggs, Katy (ELS-CAM) wrote:
Hi
I am having problems getting the email stesp working for my scripts.
[...]
<!-- Email retrieval steps -->
<emailSetConfig server="${mailserver}" password="${password}
username="${username}" delay="30"/>
<emailStoreMessageId
property="email01"
description="Give a name to the email message"/>
</steps>
</webtest>
</target>
</project>
[...]
Hi Katy,
in our email-related-tests we do:
<!-- we do extract the new password from email -->
<emailSetConfig description="connection to mail server"
server="${chewi.mailserver.name}"
type="${chewi.mailserver.servertype}" username="${chewi.mailserver.username}"
password="${chewi.mailserver.password}" delay="5" />
<emailStoreMessageId description="store messageID for subject:
${chewi.user.resetpw.mailSubject}"
subject="${chewi.user.resetpw.mailSubject}"
from="/#{chewi.user.lastname}, #{chewi.user.firstname}/"
property="chewi.user.resetpw.mail.id"
propertyType="dynamic" />
as you do. Now we get the Email by selecting with:
<emailMessageContentFilter description="return message content as response"
messageId="#{chewi.user.resetpw.mail.id}" saveResponse="true" />
<!-- mail-body is something like: Ihr Passwort wurde auf den folgenden Wert
gesetzt:CY44qt -->
<storeRegEx description="resetPassword: Extract new user's password"
text=".*${chewi.user.resetpassword.mail.content}\s(\w{6}).*" group="1"
property="chewi.user.new.password" propertyType="dynamic" />
so we read the new, initial passwort to relogin to the system.
hopefuly it help for your test.
your
--
Mit freundlichen Grüßen
Michael Habbert
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest