{"__v":0,"_id":"56a7a2b83d33bc2100793d60","category":{"__v":1,"_id":"56a7a32e79395317007c1ad6","pages":["56a98ea213a69a0d00a778d7"],"project":"568fde81b700ce0d002f4b43","version":"56954a94fe18811700c9bfda","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-01-26T16:47:42.151Z","from_sync":false,"order":0,"slug":"welcome","title":"Welcome"},"parentDoc":null,"project":"568fde81b700ce0d002f4b43","user":"568fffce769f210d0013258f","version":{"__v":6,"_id":"56954a94fe18811700c9bfda","project":"568fde81b700ce0d002f4b43","createdAt":"2016-01-12T18:48:52.007Z","releaseDate":"2016-01-12T18:48:52.007Z","categories":["56954a95fe18811700c9bfdb","56954a95fe18811700c9bfdc","56954a95fe18811700c9bfdd","56954a95fe18811700c9bfde","56954a95fe18811700c9bfdf","56954a95fe18811700c9bfe0","56954a95fe18811700c9bfe1","56954a95fe18811700c9bfe2","56954a95fe18811700c9bfe3","56954a95fe18811700c9bfe4","5695649fdcaf0d1700cb8721","5696c1168560a60d00e2c1d6","56a7a32e79395317007c1ad6","5898fc3eec49fb0f004c2663","589cc675ea37da23004e05e1"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"foo","version_clean":"0.0.0","version":"0.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-01-26T16:45:44.627Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"# Contents\n\n- :fa-angle-right: [Problems with current front-end testing tools](#section-problems-with-current-front-end-testing-tools)\n- :fa-angle-right: [Goals of Cypress](#section-goals-of-cypress)\n\n***\n\n# Problems with current front-end testing tools\n\nThere are clear benefits to testing code. But many *web applications* are not fully covered in tests. Why? There are many testing tools for the front end, but most (if not all) suffer from some problems.\n\n* **Poor Setup:** Testing environments take too long to setup.\n* **Unreliable:** Tests are often brittle, and randomly fail.\n* **Time consuming:** Running an entire test suite takes too long (sometimes hours).\n* **No Cross Browser Support:** Debugging across browsers and browser versions is very time consuming.\n* **Obscure Error Messages:** Error messages are obtuse, indirect, and increase the time it takes to debug.\n* **Coupled dependencies:** Integration tests are often coupled directly to the server.\n* **Lacking fixture support:** Handling mock data, or fixtures, is difficult.\n* **Don't encourage TDD:** Testing often occurs *after* features are built because there isn't an apparent test-driven development (TDD) flow.\n* **Lack of integration testing:** Even if unit testing JavaScript is reasonably simple, unit testing alone does not verify your application is fully functioning.\n* **Async hell:** Handling complicated asynchronous logic that is found on most modern single-page JavaScript applications is impossible.\n* **No Visibility:** Testing through a console is obscure and doesn't give full visibility on the problems your users will face using your web application.\n* **Buggy:** Selenium drivers differ in implementation details which means code breaks across different browsers and browser versions.\n\nThese are just a few reasons why it's often difficult to test modern web applications. Often it takes longer to write a passing test for a feature, than to actually build the feature.\n\nThere is a lot of mental friction when writing tests. Testing just becomes another layer to cut through. Because testing is often brittle, we lose confidence that our tests are delivering any additional value.\n\nBecause of this complexity, most organizations have an entire Quality Assurance (QA) department dedicated to these tasks.\n\n> Cypress aims to solve the biggest difficulties when it comes to testing web applications. It aims to reduce the mental effort required to write tests. Cypress works in your typical development workflow (in the browser) and allows you to see your application while it's being tested. This enables you to practice TDD since there is no context shift between testing and development.\n\n***\n\n# Goals of Cypress\n\n* **Easy Setup:** Allow you to write your first test in less than 5 minutes.\n* **Automated:** Allow you to drive your application with tests instead of manual interactions.\n* **Easy Integration:** Require zero code changes to your existing application.\n* **In-Browser Testing:** Integrate testing within your normal development process.\n* **JavaScript:** Allow you to write your test suite in JavaScript.\n* **Enjoyable:** Make writing tests an enjoyable, fun experience.\n* **Opinionated:** Encourage writing good tests.\n* **Clear error messages:** Provide **clear**, debuggable error messages.\n* **Intelligent Network Requests:** Make dealing with `AJAX/XHR` ridiculously simple.\n* **Cross-browser support:** Provide cross-browser testing and debugging **without** leaving Google Chrome and work in all modern browsers (`IE11+`)\n* **CI Integration:** Instantly integrate any Continuous Integration provider.\n* **Accessible:** Work with any JavaScript framework (current and future).\n* **Flexible:** Replace server side testing tools like `Capybara`.\n* **Integrate with Server:** Allow you to communicate directly to a backend server for seeding / querying.\n* **Elimate Selenium:** Eliminate the need to code or deal with `Selenium`.","excerpt":"What we believe and why","slug":"our-goals","type":"basic","title":"Our Goals"}

Our Goals

What we believe and why

# Contents - :fa-angle-right: [Problems with current front-end testing tools](#section-problems-with-current-front-end-testing-tools) - :fa-angle-right: [Goals of Cypress](#section-goals-of-cypress) *** # Problems with current front-end testing tools There are clear benefits to testing code. But many *web applications* are not fully covered in tests. Why? There are many testing tools for the front end, but most (if not all) suffer from some problems. * **Poor Setup:** Testing environments take too long to setup. * **Unreliable:** Tests are often brittle, and randomly fail. * **Time consuming:** Running an entire test suite takes too long (sometimes hours). * **No Cross Browser Support:** Debugging across browsers and browser versions is very time consuming. * **Obscure Error Messages:** Error messages are obtuse, indirect, and increase the time it takes to debug. * **Coupled dependencies:** Integration tests are often coupled directly to the server. * **Lacking fixture support:** Handling mock data, or fixtures, is difficult. * **Don't encourage TDD:** Testing often occurs *after* features are built because there isn't an apparent test-driven development (TDD) flow. * **Lack of integration testing:** Even if unit testing JavaScript is reasonably simple, unit testing alone does not verify your application is fully functioning. * **Async hell:** Handling complicated asynchronous logic that is found on most modern single-page JavaScript applications is impossible. * **No Visibility:** Testing through a console is obscure and doesn't give full visibility on the problems your users will face using your web application. * **Buggy:** Selenium drivers differ in implementation details which means code breaks across different browsers and browser versions. These are just a few reasons why it's often difficult to test modern web applications. Often it takes longer to write a passing test for a feature, than to actually build the feature. There is a lot of mental friction when writing tests. Testing just becomes another layer to cut through. Because testing is often brittle, we lose confidence that our tests are delivering any additional value. Because of this complexity, most organizations have an entire Quality Assurance (QA) department dedicated to these tasks. > Cypress aims to solve the biggest difficulties when it comes to testing web applications. It aims to reduce the mental effort required to write tests. Cypress works in your typical development workflow (in the browser) and allows you to see your application while it's being tested. This enables you to practice TDD since there is no context shift between testing and development. *** # Goals of Cypress * **Easy Setup:** Allow you to write your first test in less than 5 minutes. * **Automated:** Allow you to drive your application with tests instead of manual interactions. * **Easy Integration:** Require zero code changes to your existing application. * **In-Browser Testing:** Integrate testing within your normal development process. * **JavaScript:** Allow you to write your test suite in JavaScript. * **Enjoyable:** Make writing tests an enjoyable, fun experience. * **Opinionated:** Encourage writing good tests. * **Clear error messages:** Provide **clear**, debuggable error messages. * **Intelligent Network Requests:** Make dealing with `AJAX/XHR` ridiculously simple. * **Cross-browser support:** Provide cross-browser testing and debugging **without** leaving Google Chrome and work in all modern browsers (`IE11+`) * **CI Integration:** Instantly integrate any Continuous Integration provider. * **Accessible:** Work with any JavaScript framework (current and future). * **Flexible:** Replace server side testing tools like `Capybara`. * **Integrate with Server:** Allow you to communicate directly to a backend server for seeding / querying. * **Elimate Selenium:** Eliminate the need to code or deal with `Selenium`.