测试rails app的综合指南

时间:2022-01-09 16:23:12

Is there any comprehensive guides on testing rails apps. Im searching for guide that will tell me what should I test and how should I test it especially with Rspec. Lots of examples will be appreciated.

是否有关于测试rails应用程序的全面指南。我正在寻找指导,告诉我应该测试什么,我应该如何测试它,特别是使用Rspec。很多例子将不胜感激。

4 个解决方案

#1


1  

Check out Everyday Rails Testing with RSpec. Sumner does a great job of walking you through writing tests for an entire app. The Hartl book is also a great resource.

使用RSpec查看Everyday Rails测试。 Sumner在为整个应用编写测试时非常出色。哈特尔书也是一个很好的资源。

#2


6  

The RSpec Book

RSpec书

Testing the rails app is part of development so I'd sugest to read Ruby on Rails Tutorial, Learn Rails by Example by Michael Hartl, it has good explained testing process.

测试rails应用程序是开发的一部分,所以我很想阅读Ruby on Rails教程,Michael Hartl的示例学习Rails,它有很好的解释测试过程。

#3


3  

The Rails Guide A Guide to Testing Rails Applications is a good place to start.

Rails指南测试Rails应用程序指南是一个很好的起点。

It covers the default test/unit style of testing.

它涵盖了默认的测试/单元测试样式。

As suggested by @megas, the RSpec book is another place to look.

正如@megas所建议的那样,RSpec书籍是另一个值得关注的地方。

Agile Web Development with Rails is a great first book for any rails developer, covering the full process of building an application, testing it as you go.

对于任何rails开发人员来说,使用Rails进行敏捷Web开发是一本很好的第一本书,涵盖了构建应用程序的全过程,并随时对其进行测试。

#4


3  

Also take a look at Railscast as well.

另请参阅Railscast。

Some episodes that talks about testing:

一些谈论测试的剧集:

Episode 275: How I Test

第275集:我如何测试

Episode 257: Request Specs and Capybara

第257集:请求规格和Capybara

Episode 158: Factories not Fixtures revised or Older Episode

第158集:工厂不是固定装置修订或更老的情节

Episode 261: Testing JavaScript with Jasmine

第261集:使用Jasmine测试JavaScript

#1


1  

Check out Everyday Rails Testing with RSpec. Sumner does a great job of walking you through writing tests for an entire app. The Hartl book is also a great resource.

使用RSpec查看Everyday Rails测试。 Sumner在为整个应用编写测试时非常出色。哈特尔书也是一个很好的资源。

#2


6  

The RSpec Book

RSpec书

Testing the rails app is part of development so I'd sugest to read Ruby on Rails Tutorial, Learn Rails by Example by Michael Hartl, it has good explained testing process.

测试rails应用程序是开发的一部分,所以我很想阅读Ruby on Rails教程,Michael Hartl的示例学习Rails,它有很好的解释测试过程。

#3


3  

The Rails Guide A Guide to Testing Rails Applications is a good place to start.

Rails指南测试Rails应用程序指南是一个很好的起点。

It covers the default test/unit style of testing.

它涵盖了默认的测试/单元测试样式。

As suggested by @megas, the RSpec book is another place to look.

正如@megas所建议的那样,RSpec书籍是另一个值得关注的地方。

Agile Web Development with Rails is a great first book for any rails developer, covering the full process of building an application, testing it as you go.

对于任何rails开发人员来说,使用Rails进行敏捷Web开发是一本很好的第一本书,涵盖了构建应用程序的全过程,并随时对其进行测试。

#4


3  

Also take a look at Railscast as well.

另请参阅Railscast。

Some episodes that talks about testing:

一些谈论测试的剧集:

Episode 275: How I Test

第275集:我如何测试

Episode 257: Request Specs and Capybara

第257集:请求规格和Capybara

Episode 158: Factories not Fixtures revised or Older Episode

第158集:工厂不是固定装置修订或更老的情节

Episode 261: Testing JavaScript with Jasmine

第261集:使用Jasmine测试JavaScript