Perspective Custom Module Testing Environment

We are developing a custom HMI component for Perspective.
One pain point is that we have to completely recompile the MODL module to be able to test it in the Ignition environment.

Is there a way to separately test the ReactJS-based frontend part and the java backend part outside of the Ignition runtime environment, because having to recompile takes time?

Thanks for your replies.

if you made a seperate file for your main js you can test that with something like storybooks for example.
requires quite the restructure tho if you didnt do this from the start so not really worth it if you havent, you gotta test it again on ignition anyways because it jsut works a bit different.
Storybook is rly fast tho, ive used it quite a bit. But if you have a gateway delegate and stuff you cant rly do that with this.

I believe there was a way to set up a test enviorment too with docker or something but i never bothered (maybe i should idk, doesnt take to long to rebuild and it has to do it there anyways too)

You can add a -Dres.path.<moduleid>=/path/to/directory/ argument to ignition.conf; then the gateway will skip loading your resources from the module directly and instead load them from disk. Then you just need to trigger a rebuild of your frontend assets without having to rebuild and reinstall the entire module.


Should the value be assigned to a ‘’ key, which exactly ?
‘moduleid’ is the ‘name’ in the Config > System > Module Configuration page of the gateway ?

moduleId should be the exact value of your module’s ID - whatever is specified in the module.xml file. If you’re using one of our plugins, it should be pretty easy to identify.

In 8.x we switched to a reversed qualified DNS style for module IDs, e.g. moduleId = "". We generally recommend that pattern.

Absolutely use the reverse qualified DNS style for your module IDs if you ever intend to restrict access to the resulting module. When you get set up to generate license keys through IA’s servers, you will be limited to module ID’s that start with your company’s web address. For example, my module IDs all start with “com.automation_pros”. (Hyphens have to become underscores to be valid.)

1 Like