CLI Based Testing/Debugging?

I’m building out my plugin’s CI/CD which led me to:
https://github.com/adobe-uxp/devtools-cli/tree/main/packages/uxp-devtools-cli

Great! This seems like exactly what I need, a way that I can do everything the UXP developer tool can do but through the terminal!

However, for:
$ uxp plugin logs
$ uxp plugin unload
$ uxp plugin test

I get this error:

$ uxp plugin logs
Command 'plugin logs' failed.
TypeError: Cannot read properties of undefined (reading 'sessions')

Has anybody had success with doing their testing/CICD through this CLI tool? Or maybe even know why these specific commands are failing with a TypeError?

I’m on apple silicon, which I know has known issues, but as I understand it, that is related to it not working on the newest versions of npm. I’ve gotten it to otherwise work by using

$ nvm use 18

to force usage of an older version of node. I’m also working on a PPro plugin, not sure if that is relevant or not.

Anybody have any thoughts?

It took me about 80 hours to figure out E2E testing with UXP-CLI tool. Windows 64bit. Good luck with that! :smiley:

It certainly needs more care from Adobe team to make it easier.

1 Like

Thanks Jarda, it’s good to know that it is possible! I’ll keep working at it and will post the solution to my problem if I find it. Wish me luck!

1 Like

Figured it out.

When you run

$ uxp plugin load --manifest <manifest location>

it will create a .uxprc file at the same folder level as the manifest. Most commands will run fine from a parent directory but logs, unload, and test, all have to be ran from the directory that contains that .uxprc file, otherwise, when those commands look for the file they will return null instead, giving the TypeError above.

1 Like