如何运行多个特定的 RSpec 测试? [英] How to run multiple specific RSpec tests?

查看:30
本文介绍了如何运行多个特定的 RSpec 测试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个巨大的测试套件(> 5000 个测试),需要一个小时才能运行.400 次失败,我有一个失败测试的列表,如下所示:

I've got a huge test suite (> 5000 tests) that take an hour to run. 400 are failing, and I have a list of the failing tests like this:

rspec ./spec/models/fullscreen_hidden_view_state_spec.rb:116 # FullscreenHiddenViewState showing a playlist on third element - slide has all the right links and properties
rspec ./spec/features/fullscreen/play_spec.rb:59 # View case in fullscreen presention mode Courtesy section when viewing the cases discussion via the cases hidden share token the Add To button should be hidden
rspec ./spec/features/cases/index_spec.rb:204 # finding a case Filtering by study modality Filtering by modality only shows cases with modality
rspec ./spec/models/playlist_spec.rb[1:2:2:2:1] # Playlist it should behave like an entity with privacy .by_privilege (Playlist examples) for annonymous contains public playlists
rspec ./spec/models/playlist_spec.rb[1:2:2:2:2] # Playlist it should behave like an entity with privacy .by_privilege (Playlist examples) for annonymous works
rspec ./spec/models/playlist_spec.rb[1:2:2:3:1] # Playlist it should behave like an entity with privacy .by_privilege (Playlist examples) for privileged user contains all playlists
rspec ./spec/models/playlist_spec.rb[1:2:2:1:1] # Playlist it should behave like an entity with privacy .by_privilege (Playlist examples) for unprivileged users contains public and the users unlisted playlists
rspec ./spec/models/playlist_spec.rb[1:2:2:1:2] # Playlist it should behave like an entity with privacy .by_privilege (Playlist examples) for unprivileged users works
rspec ./spec/models/user_spec.rb:1004 # User quotas limited_unlisted_cases? user with manage cases privilege should equal false
rspec ./spec/models/user_spec.rb:813 # User quotas #can_add_draft_case? when non-deleted draft case count above the limit for privileged user should equal true
rspec ./spec/models/user_spec.rb:920 # User quotas #allowed_draft_cases user with manage cases privilege should eq -1
rspec ./spec/models/user_spec.rb:962 # User quotas allowed_unlisted_playlists user with manage cases privilege should eq -1
rspec ./spec/models/user_spec.rb:861 # User quotas allowed_unlisted_cases user with manage cases privilege should eq -1

我知道我可以运行每一行来运行特定的测试,但是有没有一种简单的方法来运行所有这些测试?

I know I can run each line to run the specific tests, but is there an easy way to run all of them?

推荐答案

您可以使用以下语法为多个文件运行规范:

You can use the following syntax to run your specs for multiple files:

rspec path/to/first/file path/to/second/file

这篇关于如何运行多个特定的 RSpec 测试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆