freshen icon indicating copy to clipboard operation
freshen copied to clipboard

Undefined steps should generate default code in the output

Open jacek99 opened this issue 14 years ago • 3 comments

When experimenting with Lettuce (a competing BDD tool), I noticed that when you have undefined steps, it will actually output a skeleton of the required code for a developer to quickly start with, e.g.:

    You can implement step definitions for undefined steps with these snippets:

    # -*- coding: utf-8 -*-
from lettuce import step

@step(u'Given I have the request body \'(.*)\'')
def given_i_have_the_request_body_group1(step, group1):
    assert False, 'This step must be implemented'
@step(u'When I send it to SPS SOAP Service <soap>')
def when_i_send_it_to_sps_soap_service_soap(step):
    assert False, 'This step must be implemented'
@step(u'Then I get the HTTP code 500 (Error)')
def then_i_get_the_http_code_500_error(step):
    assert False, 'This step must be implemented'
@step(u'Given I have no data in the database')
def given_i_have_no_data_in_the_database(step):
    assert False, 'This step must be implemented'
@step(u'When I send request <request> to the SPS SOAP Service <soap>')
def when_i_send_request_request_to_the_sps_soap_service_soap(step):
    assert False, 'This step must be implemented'
@step(u'Then I get the HTTP code 204 (No Content)')
def then_i_get_the_http_code_204_no_content(step):
    assert False, 'This step must be implemented'

It would be great if Freshen could offer similar functionality in order to improve developer productivity

jacek99 avatar Dec 01 '10 20:12 jacek99

Good idea. Adding to 1.0 milestone.

rlisagor avatar Jun 04 '11 20:06 rlisagor

Isn't this resolved with the --list-undefined switch ?

linovia avatar Jun 18 '11 08:06 linovia

Hasn't this already been pulled/merged; shouldn't this be closed?

dexterous avatar Sep 21 '11 18:09 dexterous