Skip to main content

Unit / Integration tests using TestGeneious

Comments

3 comments

  • Official comment
    Jason

    Hi Ayco,

    You are on the right track.

    The next steps depend on exactly what you are trying to do. For a test I just created TestGeneious.initializeAllPlugins() was enough to use createNewNoteType and getNoteType.

    Note that you need to call DocumentNoteUtilities.setNoteType before using getNoteType to retrieve a newly created note type.

    If that still isn't working because the local database is not set up then add the following to your test:

    TestGeneious.initializeAllPlugins();
    PluginUtilities.getGeneiousService("LocalDocuments");

    I hope that helps.

    Cheers,
    Jason

  • Informatiemanagement

    Hi Jason,

    I finally figured it out - though in retrospect it's all pretty obvious. My (Eclipse) should of course be exactly like if I were to run Geneious with one of the example plugins or my own plugin ... e.g. workdir settings and LD_LIBRARY_PATH settings (latter not necessary but prevents warnings).

     

    It would be good to warn developers about this in the TestGeneious class. Or maybe also include an example unit test in one of the example plugins.

     

    Bye,

     

    Ayco

    0
  • Jason

    Hi Ayco,

    I'm glad that you found the solution. Thanks for posting it here for others to find.

    Your suggestion is a good one. I have raised a ticket to improve the documentation. This of course will have to be prioritized relative to other work so I cannot guarantee if or when it will get done.

    Cheers,
    Jason

    0

Please sign in to leave a comment.