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.
We can run all of our tests at once by using the bin/rails test command. Or we can run a single test file by passing the bin/rails test command the filename containing the test cases. This will run all test methods from the test case.
TestRail is a web-based test management tool used by testers, developers and other stake holders to manage, track and organize software testing efforts. It follows a centralized test management concept that helps in easy communication and enables rapid development of task across QA team and other stakeholders .
While unit tests make sure that individual parts of your application work, integration tests are used to test that different parts of your application work together.
The RSpec Book
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.
The Rails Guide A Guide to Testing Rails Applications is a good place to start.
It covers the default test/unit
style of testing.
As suggested by @megas, the RSpec book is another place to look.
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.
Also take a look at Railscast as well.
Some episodes that talks about testing:
Episode 275: How I Test
Episode 257: Request Specs and Capybara
Episode 158: Factories not Fixtures revised or Older Episode
Episode 261: Testing JavaScript with Jasmine
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With