I have output issues both with scenario outlines and using step tables. I'll
deal with scenario outline in this mail. This will have to be an html mail
as I need color to say what I want to say, I'll also use a real world
example so this will be a bit long
Currently the output of my scenario outline is
--
Scenario Outline: viewing resources #
features/admin/poop.feature:6
Given an admin user admin exists #
features/admin/poop.feature:7
And there are 4 <resource> #
features/admin/poop.feature:8
When I login as admin with adminpass #
features/admin/poop.feature:9
And I visit admin_home page #
features/admin/poop.feature:10
Then I should be at the admin_home page #
features/admin/poop.feature:11
And I should see a <resource> resource #
features/admin/poop.feature:12
When I ppope ksdjhfkh jadfh kjh kahjkh ksdfh khsdfa <resource> #
features/admin/poop.feature:13
When I follow <resource> resource #
features/admin/poop.feature:14
Then PPouay Widgit should see a list of 4 <resource> #
features/admin/poop.feature:15
And I should see a new <resource> link #
features/admin/poop.feature:16
|resource|
|category|
|product |
|user |
4 scenarios
15 steps passed
3 steps skipped
12 steps pending (12 with no step definition)
--
So I'd like more information about which steps are matched which are skipped
etc.
--
Scenario Outline: viewing resources #
features/admin/poop.feature:6
Given an admin user admin exists #
features/step_definitions/accounts/creation.steps.rb:66
And there are 4 <resource> #
features/step_definitions/general.rb:1
When I login as admin with adminpass #
features/step_definitions/accounts/login.steps.rb:35
And I visit admin_home page #
features/step_definitions/general.rb:19
Then I should be at the admin_home page #
features/step_definitions/general.rb:30
And I should see a <resource> resource #
features/admin/poop.feature:12
When I ppope ksdjhfkh jadfh kjh kahjkh ksdfh khsdfa <resource> #
features/admin/poop.feature:13
When I follow <resource> resource #
features/step_definitions/admin_steps.rb:23
Then PPouay Widgit should see a list of 4 <resource> #
features/admin/poop.feature:15
And I should see a new <resource> link #
features/admin/poop.feature:16
|resource|
|category|
|product |
|user |
3 scenarios
5 steps passed 3 times
1 steps skipped 3 times
4 steps pending (4 with no step definition)
--
Now there are a couple of issues I can think of that might challenge this
output. This is basically situations where the output varies dependent on
the resource.
1. Different step matches a line dependent on resource
And there are 4 <resource>
And there are 4 category #
features/step_definitions/category.rb:1
And there are 4 product #
features/step_definitions/product.rb:1
And there are 4 user #
features/step_definitions/user.rb:1
2. Different result of step depending on resource i.e. sometimes is matches
sometime it fails. Here the line color should be of the worst result
And there are 4 <resource>
And there are 4 category #
features/admin/poop.feature:8
And there are 4 product #
features/step_definitions/product.rb:1
And there are 4 user #
features/step_definitions/user.rb:1
---
An alternative approach might be to expand the resource display when things
go wrong, i.e. put problems underneath the resource in which they're
detected
|resource|
|category|
And there are 4 category #
features/admin/poop.feature:8
|product |
|user |
So here I can tell that this step hasn't passed
I hope this helps
Andrew
2009/1/17 aslak hellesoy <[email protected]>
>
>
> On Sat, Jan 17, 2009 at 5:08 AM, Andrew Premdas <[email protected]>wrote:
>
>> I'm having problems knowing what a scenario outline I've created is doing.
>> In particular I have no idea about what steps are being matched when the
>> outline is run so when I break something I can't find out what is wrong. Is
>> there any progress on getting better output for scenario outlines.
>>
>
> It would be immensly helpful if you could give some examples of what kind
> of output you think is better.
>
> Aslak
>
>
>>
>> TIA
>>
>> Andrew
>>
>> _______________________________________________
>> rspec-users mailing list
>> [email protected]
>> http://rubyforge.org/mailman/listinfo/rspec-users
>>
>
>
>
> --
> Aslak (::)
>
> _______________________________________________
> rspec-users mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/rspec-users
>
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users