1

I'm trying to use ldtp to test my quickly app.

ldtp.launchapp('bin/myapp') doesn't work because myapp requires whatever voodoo quickly sets up in order to actually launch the app.

How can I get ldtp.launchapp to work properly? (Maybe the right question is: What is the voodoo that quickly sets up in order to run the app? Does quickly expose this API so that I can call it from my test?)

1
  • Actually, one major downfall to the ldtp.launchapp approach is that nosetests --with-coverage doesn't work since the app is launched as a separate process. It would probably be best to do a MyappWindow().show()(-ish) directly from within the test.
    – bstpierre
    Jun 30, 2012 at 3:26

2 Answers 2

1

This makes me feel dirty, but it seems to be a viable workaround:

class TestMyappClose(unittest.TestCase):
    def test_close(self):
        launchapp('/usr/bin/quickly', ['run'])
        exists = waittillguiexist('*myapp', guiTimeOut=5)
        assert(exists == 1)

        selectmenuitem ('*myapp', 'mnuFile;mnuClose')
        waittillguinotexist('*myapp')
0

If you created it using Quickly (the app), "quickly run" (after cd'ing into the folder) will almost always work. If you created it from scratch, then it might not work.

1
  • I think you've missed the point. I'm looking for a way to launch the app from within a test script that's invoked by quickly test (or nosetests). See my answer and my comment below the question -- I'm doing what you suggest from within the test script, but it's not ideal.
    – bstpierre
    Jun 30, 2012 at 18:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .