about automated testing with Ext JS 4! - Over 5 years ago! • Combined various tools! - Jasmine, Team City, WebDriver, Istanbul, Siesta, Sauce Labs! • Across the test spectrum! - Unit tests! - Integration (component) tests! - Application tests (for our examples, etc.)! - Visual testing for CSS issues! 5!
are run…! - On each pull request before merging! - Against main branches after merge! • Tests are run on IE8-11, Edge, Firefox, Chrome, Safari, iPad etc..! - Multiplied out that comes to 330,000 test executions per run! - With code coverage on most branches! • QA team! - Runs automated tests on apps and examples using nightly builds! 6!
bug…! - How did it break again?!?! • It is hard to write asynchronous tests…! - I’ll add some when I have more time.! • It works on my machine…! - But fails in the CI run!! • How do I test my code…! - In the same way the CI does?! • The tests all pass….! - But things don’t look right!! 7!
Unit Tests! - Creating class instances, calling methods directly! - No User Interface involved! 2. Integration Tests! - Isolated instances of Components, Views and Controllers! - Mock dependencies! 3. Application Tests! - Launch application! - Interact with the UI and check results! 9!
Tests Unit Tests • Easy to write! • Fast execution! • Immediate feedback! • More complex! • Slower to run! • Typically async! • Isolation can be tricky! • Mocking is tricky! • Hardest to write! • Tedious to run! - Require installed app! - Server environment! • Data / Results hard to make predictable!
experience! • Common request from customers! • One place for the dev and QA team to collaborate! - Because it handles unit, integration and application testing! • First release covers the essential workflows! 15!
application structure! - Works seamlessly with Cmd-based projects! - Works with any web app that has a URL! • Test configuration performed in Sencha Studio is used to…! - Run tests directly in Sencha Studio! - Run tests via the Sencha Test command-line tool (stc)! • First things to check out! - Test Runner! - Futures API! 17!
• Intelligently manages browser tabs! • Parked browsers are redirected to test runners! • Redirected back when runner is closed! • Preserves debugger context!
locate the grid rowAt(1000). // interact with a row cell('firstName'). // now with a cell reveal(). // scroll into view click(10, 10); // click at offset 26!