SPONSORS:






User Tag List

Results 1 to 8 of 8
  1. #1
    Senior Member
    Join Date
    Jun 2002
    Posts
    119
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to get SilkTest to check if an email was sent and received?

    I'm working on automating the testing of a web app. In a few places it generates an email to the user (like to confirm a registration). The app is installed on a test machine in the lab, and I run my scripts from my cubicle desktop. When Silk clicks the OK button on the browser page here, the app on the test machine generates an email which is sent to my company email address which then my Outlook Express fetches for me back on the desktop. The email contains all the polite niceties of an automated message, and a link that the recipient is to click which takes him to the "website" for further activity.

    I'm still something of a rookie, and don't know where to begin to look for what I want, which is to confirm that the email was received and that the link that is in the body of the email works correctly.

    Any guidance?

    Do I need to have OE open before the testcase? My existing scripts open and close the browser every testcase. I can't find how to open an app like OE.

    I also wonder about jumping from one app to another. Can silk do that?

    I found a remark in the manual, indicating that if you're not testing a web app, you need to turn off all extensions. Will I need to enable and disable extensions in the middle of a testcase?

    I might be able to dig out what I need in the manual and the Help in SilkTest, but I'm hoping for at least a few general pointers before reinventing the wheel.

    Thanks so much


    ------------------

  2. #2
    Senior Member
    Join Date
    Oct 2001
    Location
    NC, United States
    Posts
    148
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to get SilkTest to check if an email was sent and received?

    This may not be the only or the best soluiton but --- i believe you have to automate the Outlook as an app(declare, open, manipulate similar to opening notepad during testing). The problem lies in SilkTest identifying the objects in Outlook. If you could play around and get this straight......even if you cannot get to read the content of the mail(automation) you could export to text file and then do the manipulation.

    ------------------
    -gram
    -gram

  3. #3
    Senior Member
    Join Date
    Dec 2001
    Location
    Bozeman, MT, USA
    Posts
    265
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to get SilkTest to check if an email was sent and received?

    how about this. Create a seperate email acct just for your testing. Then use GetMail to recieve the email. Getmail is a command line utility that allows you to recieve and read email. You will just have to define the command prompt which is much simpler than defining OE.
    http://www.interlog.com/~tcharron/getmail.html

    ------------------
    Ryan McCullough
    Accelrys Inc.
    ryan@accelrys.com
    Ryan McCullough
    RightNow Tech. Inc.

  4. #4
    Senior Member
    Join Date
    Jun 2002
    Posts
    119
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to get SilkTest to check if an email was sent and received?

    gram -- run that by me again?

    I've been playing.

    I captured the Outlook Express window, and to my surprise it calls itself a DialogBox, not a MainWin. MainWin has a Start method, but DialogBox does not. I cheated and changed it to declare it as a MainWin and named it OE. Then I did

    OE.Start("c:\Program Files\Outlook Express\msimn.exe")

    and to my delight it launched OE. But then it complained that it couldn't find itself, since it still has the tag from when it was declared as a DialogBox.

    Then I opened OE manually and did a call to

    ListPrint(OE.NavigationPane.Contacts.GetContents() )

    and it printed out the contents. OK, we're rolling.

    So I copied the declaration a second time and named the first one OEwin and kept it as a MainWin, and let the second one remain as a DialogBox and called it OE. So now I hoped I could kick it off with the OEwin.Start() and then call something on the OE object and see if it would happen, but it stalled again on the first line.

    So maybe in testing I could just leave it open, but who knows, this is just day 1 of investigation.

    rmccullough -- I got Getmail, but haven't installed yet. Do you think it would be able to get the mail so I could tell Silk to click on a link in the mail? Or is everything in the command window? Clicking on the link is essential to the test.

    Thanks



    ------------------

  5. #5
    Senior Member
    Join Date
    Dec 2001
    Location
    Bozeman, MT, USA
    Posts
    265
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to get SilkTest to check if an email was sent and received?

    the hotmail acct is a good idea but the one thing I would caution you about is that you are now tied to a third party and anytime they change their site(which is often) you will have to adapt. They also use some funky controls.

    I think your best bet is to either use the command line program that I gave you or do like Steve said and setup your own internal email server with web access.

    Ideally you should setup your own email server anyways to isolate yourself from using your companies mailserver to send the email and recieve it.

    Also a web based reading solution may be easier for you to interact with.

    Getmail is nice bacause it is very simple and would take very little setup time and virtually no learning curve. Problem with it is that I dont think it is GUI. So the html link will probly be there but its going to be like <a href='www.google.com'>link</a> or something like that.

    Perfect situation is what Steve said. Your own email server running neomail.

    ------------------
    Ryan McCullough
    Accelrys Inc.
    ryan@accelrys.com
    Ryan McCullough
    RightNow Tech. Inc.

  6. #6
    Senior Member
    Join Date
    Aug 1999
    Location
    MA
    Posts
    129
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to get SilkTest to check if an email was sent and received?

    We set up our own SMTP email server on Linux and added web based NeoMail (http://neomail.sourceforge.net/) on the server.

    This way we just had to automate IE to go retrieve the email through a web based HTML interface. If you've got any Linux expertise in house it should not take much effort to get it running.

    Originally we started by trying a windows based tool (Outlook Express, Eudora) but the declarations got tricky and it was not easy to grab the attachments out of the email. Plus we did not want to have someone's company account tied to the automation scripts.


    ------------------
    Steven Tyler
    SQA Automation Team Manager
    Workforce Central Group
    Kronos Incorporated
    E-Mail: styler@kronos.com
    www.kronos.com
    Improving the Performance of People and Business™
    Steven Tyler
    Manager - Performance Engineering

    Kronos Incorporated
    tel: +1 978 947 4219

  7. #7
    Senior Member
    Join Date
    Jun 2002
    Posts
    119
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to get SilkTest to check if an email was sent and received?

    Well, the guy down at the other end of the building who also does Silk stuff, but in another department, suggested what seems even easier. Set up a webmail account like Hotmail, and use that. Then I don't have to leave the browser at all. I tried it with my own account, which I only use for internet registrations that require an email address, and I was able to register a bogus user in our web app, give him that address, and the app sent off the "Welcome to our site, Asdfasdf,..." to there. Then I wrote a little bogus testcase that goes right in and navigates to the email, opens it, clicks the embedded link that goes to our company site, and verified that it Exists(). It worked. So that should do just fine, I think.

    I wouldn't have thought of that in a week. I'm still a rookie, and too ready to look at a problem as it seems to be right in front of me, rather than stepping back a bit. How do I dig a hole through this wall?, rather than is there any way around this wall?

    ------------------

  8. #8
    Junior Member
    Join Date
    Feb 2003
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to get SilkTest to check if an email was sent and received?

    I used Perl script to send and check e-mails.
    Perl script can be run from SilkTest using SYS_Execute () command.

    ------------------

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 02:29 AM.

Copyright BetaSoft Inc.