go-bdd / gobdd

BDD framework
https://go-bdd.github.io/gobdd/
MIT License
115 stars 19 forks source link

Prepend gherkin keywords to test names #108

Closed sagikazarmark closed 4 years ago

sagikazarmark commented 4 years ago

Is your feature request related to a problem? Please describe. When reading test cases out loud, it's often hard because one cannot directly map test names to gherkin steps.

Describe the solution you'd like Consider the following test output:

--- PASS: TestList (0.00s)
    --- PASS: TestList/Todo_list (0.00s)
        --- PASS: TestList/Todo_list/Add_a_new_item_to_the_list (0.00s)
            --- PASS: TestList/Todo_list/Add_a_new_item_to_the_list/I_add_entry_"Call_mom" (0.00s)
            --- PASS: TestList/Todo_list/Add_a_new_item_to_the_list/I_should_have_a_todo_to_"Call_mom" (0.00s)

With gherkin keywords:

--- PASS: TestList (0.00s)
    --- PASS: TestList/Todo_list (0.00s)
        --- PASS: TestList/Todo_list/Scenario_Add_a_new_item_to_the_list (0.00s)
            --- PASS: TestList/Todo_list/Scenario_Add_a_new_item_to_the_list/When_I_add_entry_"Call_mom" (0.00s)
            --- PASS: TestList/Todo_list/Scenario_Add_a_new_item_to_the_list/Then_I_should_have_a_todo_to_"Call_mom" (0.00s)

Additional context TBH, I'm not sure if this is even possible.

bkielbasa commented 4 years ago

I think it's possible but I'm not sure if it's hard or not but generally I like the idea 👌