revans / Ti

A Rapid Development framework for Titanium
http://www.codewranglers.org
MIT License
88 stars 21 forks source link

Testing Framework #33

Open davejlong opened 12 years ago

davejlong commented 12 years ago

Instead of Jasmine for testing in Ti apps, would it be worth looking at using JSUnity instead? Others in the past have used JSUnity successfully with Titanium apps (http://developer.appcelerator.com/question/741/unit-testing-support)

I am working on integrating it right now into an application I am building with the Ti gem and I could add it to the gem's generators on a pull request if you'd be interested in using JSUnity in the gem.

baldrailers commented 12 years ago

Thanks @davejlong looking forward to that.

davejlong commented 12 years ago

I started building the testing system, but it is quite complex. The way that I am building it is that the tests actually create a mobile app so that you can run tests against all methods that utilize Titanium methods like the httpClient. Any issues that anyone could think of, overwriting the app in the Resources directory with new app code when you run tests with a Rake job (rake tests:compile and rake tests:builld [iphone/android])?

baldrailers commented 12 years ago

The compiled js files in the Resources folder will be the concern, unless your overwriting them as well, that'll be an issue. But if you re-run the build and compile command the js files should be automatically generated.