How to sign MIDlets with different certificates
A question first: Are we talking about standard automated tests or OTA tests?
For automated tests, read below. OTA is a special case, we can discuss it
later if the need arises.
> I have a bunch of Midlets in my test suite.But i
> want to sign only some of the Midlets with
> special certification.
> Actually when i tried with default certification, it
> was signing all Midlets.
> What is the proecedure to sign only some midlets in
> my test suite?
ME Framework doesn't deal with arbitrary MIDlets. ME Framework deals
with tests, and the tests are bundled into the test bundles. For MIDP, the test
bundle is a MIDlet. For CLDC, the bundle is just a JAR file, and for CDC there is
no bundling at all.
So, all tests bundles in MIDP case are MIDlets, and the Framework signs them
with certificate specified by user. 3rd party MIDlets not directly related to the
test bundles, are outside of ME Framework area of responsibility, and there is
no direct support for them.
For particular test suite, like in your case, it's up to you to decide how to handle
those additional MIDlets. You could perform any actions during test suite startup
(when the tets run starts), and in that custom code you could sign MIDlets, start
servers, or do anything that Java can do. We have utility classes that could simplify
your signing code: FastJKSSigner, JKSSigner.
But this approach means that for *every* test run you'll have to sign those extra MIDlets, over and over again, which might result in some noticeable delay during test suite start.
Another possibility is to write external scripts (be it Ant, Shell, BAT files), and instruct users to enter their credentials somewhere (into some file), and then to invoke the script, just once, signing the MIDlets. Yes, that's a bit more complex for users, but on the other hand, that will improve test start times.
Hopefully, I correctly understood your situation: You'd like to create additional MIDlets and sign them with different certificate. But how are you going to deliver them on the device? The device will be executing the normal tests at that time. Or, do you plan to have multiple devices at the same time, some running automated tests, and some other devices just executing additional MIDlets manually? Or, maybe you just would like to mark some tests to be executed in MIDlet that is signed by different certificate?
It would be great if you could describe your situation in more detail.