问题
I cant see any "how to test a Sencha 2 app" in the documentation - is there really no framework support for testing? How should one test a Sencha 2 app, whats best pratice?
回答1:
Run your app under local server like wampserver, apache tomcat etc.
Be sure to use Web browsers like Chrome, Safari only which supports Webtk engine.
回答2:
found a good Sencha blog about testing:
http://www.sencha.com/blog/automating-unit-tests/
回答3:
Here's a 5 part series covering unit testing using Jasmine (used internally by Sencha) and integration testing using Siesta (built for Sencha app level testing).
- http://pivotallabs.com/sencha-touch-bdd-part-1/ - Jasmine unit testing
- http://pivotallabs.com/sencha-touch-bdd-part-2/ - Unit testing models.
- http://pivotallabs.com/sencha-touch-bdd-part-3/ - Testing Views and Mocking Stores
- http://pivotallabs.com/sencha-touch-bdd-part-4/ - Headless testing using PhantomJS
- http://pivotallabs.com/sencha-touch-bdd-part-5/ - Controller testing.
回答4:
As referenced in the comment links... the best way to do it is to run it localhost. I use xampp to do this. You need to also install Sencha SDK tools, etc. You can find the official guide on how to setuo your application for testing using sencha command here: http://docs.sencha.com/touch/2-0/#!/guide/command
回答5:
I suggest using a Rails architecture with Cucumber, Capybara and Selenium to to tests your Sencha Touch 2 web application. This is working pretty well for me.
来源:https://stackoverflow.com/questions/11704665/how-to-test-a-sencha-2-app