Skip to content

Loading…

Lettuce not show time more 1 hour #296

Closed
gigimon opened this Issue · 11 comments

3 participants

@gigimon

Hello

I'm have test that work more 1 hour, but lettuce say always:

(finished within 1 hours)

@gabrielfalcao

Hi @gigimon, this feature was never given much importance because tests are not supposed to take that long, at least not very oftenly.

I'm gonna add this ticket to a "low priority" bug list but I'd advice you to revisit your tests and see why they are taking so long :)

@gigimon

It's not critical for me, will wait :) Tests is normal because we use lettuce for functional testing, not for unit test and test environment very long creates and work.

@adaschevici
Collaborator

I was going to have a go at this,
has the time lapse feature been removed?

@gigimon

@adaschevici if you do this - it will very good for me, thx

@adaschevici
Collaborator

can you provide some more detail of the way i can reproduce?
Are you using it with django and webdriver?
I have tried to write a test that is narrowed down eg: the factorial example they have on their website but i am not seeing the message
(finished within x time)
Can you provide more details on the scenario?

@gigimon

I use lettuce without django. I use it for big integration test which can go more 2 hours.
After all scenarios will be good see message like this:
(finished within 1 hours, 32 minutes, 58 seconds)

@adaschevici
Collaborator

Are you testing with webdriver/selenium?
If you run a test that runs for less than 5 minutes do you see a message?
(finished within 4 minutes, 23 seconds) ?

I ran a test for 5 minutes and i did not get any messages

What version of lettuce are you using?

You can get the version via
lettuce --version

@gigimon

No, I don't use selenium/webdriver.

lettuce --version
0.2.16

About time I can't reply You, because I write my own workaround code for this

@adaschevici
Collaborator

The version you have is a bit outdated. In the latest sources the time passed feature does not seem to be there anymore.

I have version 0.2.19 .

As far as i can tell this no longer applies and i would suggest closing it.

@gabrielfalcao

Guys remember you can always write your own output plugin inside of your terrain.py:

import time
from lettuce import world, before, after


@before.all
def record_start(*args, **kw):
    world.started_at = time.time()


@after.all
def show_duration(*args, **kw):
    finished_at = time.time()

    duration = finished_at - started_at

    print "It took %d seconds to run" % duration

Replace the silly code above with one that shows the output however you want :)

@gabrielfalcao

LOL, just realized you both have pandas as gravatar, what a cool coincidence :panda_face:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.