03-03-2011 07:09 AM
I don't see any tests in the current repo but I'd like to write a couple to get acquainted. I assume there's been some discussion or standard at RIM that I'd play along with.
I'm not sure how tests could be run. I suppose the easiest way would be to a simple applicaiton that runs through a bunch of unit tests.
I'm fond of qUnit but I could also see something like JS Test Driver being helpful because it supports pointing tests to run on another machine and other larger scale features. JS Test Driver has adapters to a bunch of frameworks, including qUint .
03-08-2011 02:35 PM
Currently we have a couple different frameworks.
For testing the JavaScript interfaces we are using the yUI testing framework.
For testing the Java APIs we have a junit like test framework that will work on the simulators
For testing the ActionScript APIs we rely on the top level yUI JavaScript testing. We haven't found a nice free solution for actionscript unit testing.
These will all be pushed up into the repository when they are ready to roll on a developer's desktop that isn't inside of RIM's walls ![]()
04-17-2011 04:11 PM
Tim, has RIM ever talked about integration/functional testing? Something that is end-to-end, and could be run on a simulator. I've been thinking about this for a bit and I've read various bits about how the BlackBerry simulator could be "scripted" with basic events.
Related to this is Android's Exerciser Monkey that sends random events to the simulator/device to stress test applications: http://developer.android.com/guide/developing/tool
Unit tests for both "sides" of the API (native & JavaScript) is good, but I think it can get better. This has been in the back of my mind for general PhoneGap testing, but I have to start at some specific platform and looking for ideas if it's possible to implement on BlackBerry.
Cheers,
Fil
04-17-2011 04:18 PM
Hi Fil,
Yes it is possible to run the simulator and then tell it to load a test suite and run it and put its results somewhere. We currently have this running with our testing teams internally. We are planning on getting this out as part of the project. To be honest we're swimming in the PlayBook release at the moment so we haven't had a chance to get it up into github.
What are your thoughts around how the test suites should be structured? Should they be different test suites for each platform (Smartphone and PlayBook) or should there just be one test suite repo that you can run either the PlayBook or Smartphone tests? I'm imagining there will be a lot of them in common.
04-18-2011 01:21 PM
I really can't say without having a better idea of the discrepancies between the two. Since the goal is to eventually merge the two projects, then having the same objective in mind for the test suite makes sense.
I would recommend, try keeping the suite as consistent as possible so as to run on both devices, and only branch out when you need to.
I am looking forward to see all this good stuff on GitHub!