Donate Share

MicroEmulator

Subscribe

Can you run it in headless mode?

  1. 2009-09-26 23:02:55 UTC

    Hello,

    I have an idea from the genius Einstein :)

    I would like to do the following: is it possible with MicroEmulator

    1) I run my application framework which take screenshot by itself

    2) I save those screenshots

    3) Junit test class loads the screenshot as test cases

    4) JUnit test class loads MicroEmulator in headless mode????

    5) JUnit test class writes on the headless graphics and create screenshots

    6) JUnit test class tests if both screenshot match!

    So basically can I just create a headless graphics object specifiying screen size?

  2. 2009-09-28 10:11:04 UTC

    Hi lz_mordan, I already implemented something like but not for Junit test. It works in following way - you run ME (modified) in recording mode - it writes a script recording user key presses, in text file (you can modify it later), and can save a screen shot as well.

    Then you can run ME in playing mode - it will read the scripyt, emulating key presses, and checking the screen shot against current screen content.

    We didn't submit the code to ME project, they are not good enough, but can share it to anybody interested.

  3. 2009-09-28 14:43:24 UTC

    Iz_mordan,

    1. To start MicroEmulator in headless mode use the org.microemu.app.Headless as a main class.
    2. org.microemu.app.ui.DisplayRepaintListener is a correct interface to be informed about screen display changes, application should subscribe using the following method: ((SwingDisplayComponent) emulatorContext.getDisplayComponent()).addDisplayRepaintListener
    3. command line option: --resizableDevice {width} {height} - force to use resizable device skin with specified width and height.

    BR, Bartek Teodorczyk

< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.