Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

System tests VS integration tests Rails 5.1?

Before upgrading to rails 5.1 i test my rails app via integration tests. And 70% of my rails app is automated via integration tests. Means all of application simple and complex behaviors are automated via integration tests. Off-course rails did not provided any java-script based testing.

With Arrival of Rails 5.1 they include system tests and said that every app interact with java-script and now you can test your app end to end scenarios like a real user interacting with browser. So my manager ask me to move all integration tests to system tests. Ok good! we can test our application the way our users experience it and help us test JavaScript as well.

Definitely system test can cover almost all integration tests as well. So whats the importance of integration testing now ?

Why should someone write integration test in Rails 5.1 when he can write same test case in System test?

Thanks in advance.

like image 315
Zia Qamar Avatar asked Jul 07 '17 06:07

Zia Qamar


People also ask

What is the difference between system testing and system integration testing?

System testing is a testing level in which tests are performed to know if a complete build aligns with functional and nonfunctional requirements made for it. In contrast, Integration testing is a testing stage where two or more software units are joined and tested simultaneously.

What are system tests in Rails?

A Rails 6 system test is a test that exercises your application in a way that, as much as possible, simulates a real user interacting with it via a browser. More than any other kind of tests, system tests verify that the whole app does what it's supposed to do.

What are integration tests Rails?

What is Integration Testing? 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. They are normally used to test at least the most important workflows of applications.

Is e2e and integration testing the same?

Integration testing begins at the very beginning of the development process. Bugs are caught sooner in the cycle rather than later. It's simple to incorporate into daily builds, and it's simple to test in the development environment. When compared to end-to-end tests, tests run faster.


1 Answers

I wonder the same, but from this I get the impression that system tests will replace integration testing - however, the only drawback seems to be speed and resource usage.

like image 69
folium Avatar answered Oct 02 '22 13:10

folium