Robot Framework file is executing twice in a row - and shouldn't be...

271 views
Skip to first unread message

Boberry

unread,
Dec 7, 2010, 2:15:18 PM12/7/10
to robotframework-users
Hi, newbie here - I've created a RF txt file with 2 testcases. When I
run the file (pybot filename.txt) my logfile (prints statements to a
file I name), it shows the testcases executed twice.... I don't have
any loops in any of my files.

I print a statement to file after every action - here is what I get in
my log file:

Tue Dec07 2010 12:07:22PM: Reverting VM clean snapshot
Tue Dec07 2010 12:07:34PM: Done!
Tue Dec07 2010 12:07:34PM: Copying msi file to VM
Tue Dec07 2010 12:08:21PM: Done!
Tue Dec07 2010 12:08:21PM: Reverting VM clean snapshot
Tue Dec07 2010 12:08:45PM: Copying msi file to VM


I'm using a python runner to control the VMware VIX interface. These
tests revert the VM to a clean snapshot and start the snapshot and the
second copies files from the host to the guest Virtual Machine.

The actions are successful - the VM is reverted to the correct
snapshot and the file is copied over to the VM.

When I run the python version (filename.py) the double execution does
not happen.

I'm perplexed - any thoughts?

Pekka Klärck

unread,
Dec 7, 2010, 4:35:59 PM12/7/10
to jerri...@smarttech.com, robotframework-users
2010/12/7 Boberry <jerri...@smarttech.com>:

> Hi, newbie here - I've created a RF txt file with 2 testcases.  When I
> run the file (pybot filename.txt) my logfile (prints statements to a
> file I name), it shows the testcases executed twice....  I don't have
> any loops in any of my files.
>
> I print a statement to file after every action - here is what I get in
> my log file:
>
> Tue Dec07 2010 12:07:22PM: Reverting VM clean snapshot
> Tue Dec07 2010 12:07:34PM: Done!
> Tue Dec07 2010 12:07:34PM: Copying msi file to VM
> Tue Dec07 2010 12:08:21PM: Done!
> Tue Dec07 2010 12:08:21PM: Reverting VM clean snapshot
> Tue Dec07 2010 12:08:45PM: Copying msi file to VM

You seem to be using a custom test library here. Any change you have
some code in module level of that library so that it is executed once
already when the library is imported?

What do you get into your Robot Framework log file? Is the test there
once or twice? Do the executed keywords have anything interesting
inside them in the log?

Cheers,
.peke
--
Agile Tester/Developer/Consultant :: http://eliga.fi
Lead Developer of Robot Framework :: http://robotframework.org

Jerri Mottl

unread,
Dec 7, 2010, 5:40:01 PM12/7/10
to Pekka Klärck, robotframework-users
Oops, by habit I hit 'Reply' instead of 'Reply All' :)

-----Original Message-----
From: pekka....@gmail.com [mailto:pekka....@gmail.com] On Behalf Of Pekka Klärck
Sent: Tuesday, December 07, 2010 2:47 PM
To: Jerri Mottl
Subject: Re: Robot Framework file is executing twice in a row - and shouldn't be...

Great you got this fixed!

Btw, you replied just to me. Not sure were you targeting the whole list.

Cheers,
.peke


2010/12/7 Jerri Mottl <Jerri...@smarttech.com>:
> Hi .peke
>
> I actually just figured out what I was doing wrong - and that was exactly it...
>
> I had to rearrange a bit and now no double execution.
>
> Thanks for your prompt reply - I really appreciate it :)

Reply all
Reply to author
Forward
0 new messages