Hi Kamesh,

I'm working toward a filtering scheme that would require multiple tags to 
match in order to trigger, similar to your 'platform' and 'smoke' cases.  
I'm curious where you defined your cases.  Did you use a separate 
configuration file or add lines to the spec_helper?

I'd like to be able to write filters on the fly, but the --tag options 
available to the command line obviously run everything for each tag rather 
than blocks that match multiple tags only.

Thanks!

Mike


On Monday, April 7, 2014 at 1:56:42 PM UTC-5, Kamesh Velu wrote:
>
> Hi
> I have quite a few amount of test cases and i am looking for a way to 
> create test suites that are derived by using tag filters. Any advice of how 
> to implement this will be appreciated.
>
> This is what i am trying to do
>
> description 'Feature 1' do
>   context 'Context 1' do
>     it 'test case 1, run on all 3 platforms', :platform1, :platform2, 
> :platform3, :smoke do
>         steps1
>         step2
>     end
>
>     it 'test case 2, runs only 2 platforms', :platform1, :platform3, 
> :regression do
>         steps1
>         step2
>     end
>
>     it 'test case 3, run only on 2 platforms', :platform1, :platform2, 
> :smoke, :regression do
>         steps1
>         step2
>     end
>   end
>
>   context 'context 2' do
>     it 'test case 4, runs only on one platforms', :platform1, :smoke, 
> :regression do
>         steps1
>         step2
>     end
>
>     it 'test case 5, run on all 3 platforms', :platform1, :platform2, 
> :platform3, :smoke  do
>         steps1
>         step2
>     end
>   end
> end
>
>
>
> I want to create filter like this
>
> All test cases that can run on platform 1: filter_run_including :platform1
> All test cases that can run on platform 2: filter_run_including :platform2
> All test cases that can run on platform 3: filter_run_including :platform3
>
> All smoke test cases for platform 1: filter_run_including :platform1 AND 
> filter_run_including :smoke
> All smoke test cases for platform 2: filter_run_including :platform2 AND 
> filter_run_including :smoke
> All smoke test cases for platform 3: filter_run_including :platform3 AND 
> filter_run_including :smoke
>
> All regression test cases for platform 1: filter_run_including :platform1 
> AND filter_run_including :regression
> All regression test cases for platform 2: filter_run_including :platform2 
> AND filter_run_including :regression
> All regression test cases for platform 3: filter_run_including :platform3 
> AND filter_run_including :regression
>
> Thanks
>
>
>     
>

-- 
You received this message because you are subscribed to the Google Groups 
"rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rspec/0403d85f-8196-4440-82b1-c3dbd000bdbf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to