galasa-dev / projectmanagement

Project Management repo for Issues and ZenHub
7 stars 3 forks source link

Managers: managers to Have better logging for missing properties #1872

Open KirbyKatcher opened 1 month ago

KirbyKatcher commented 1 month ago

Story

As a Galasa user when I use a manager without specifying all the properties it needs, I want to receive an error message describing the name of the property it expected to find, so that I can add the property to my cps.properties or the ecosystem cps, in order to use the manager in my test.

Background

Example: #1850 When you try to use the Db2 manager without any cps properties, you get the following exception:

dev.galasa.framework.spi.FrameworkException: Bundle failed to install and activate
    at dev.galasa.framework.BundleManagement.loadBundle(BundleManagement.java:57) ~[-1714452933856:?]
    at dev.galasa.framework.TestRunner.runTest(TestRunner.java:232) [-1714452933856:?]
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
    at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
    at dev.galasa.boot.felix.FelixFramework.runTest(FelixFramework.java:233) [galasa-boot-0.31.0.jar:?]
    at dev.galasa.boot.Launcher.launch(Launcher.java:176) [galasa-boot-0.31.0.jar:?]
    at dev.galasa.boot.Launcher.main(Launcher.java:126) [galasa-boot-0.31.0.jar:?]
Caused by: dev.galasa.framework.spi.FrameworkException: Bundle failed to install and activate
    at dev.galasa.framework.BundleManagement.addResource(BundleManagement.java:168) ~[-1714452933856:?]
    at dev.galasa.framework.BundleManagement.loadBundle(BundleManagement.java:55) ~[-1714452933856:?]
    ... 8 more

It would be easier to understand the message if the exception contained a message such as unable to provision "<Manager Name>"as the property "db2.dse.instance.<TestTagName>.name" is not set

Tasks