enhancement
If a test is being run and a command cannot be executed (a button cannot be clicked), the only error message currently displayed is:
Command cannot be executed
. The reason why the command cannot be executed can only be determined by reading the log message:
2023-04-04T12:18:03,100 ERROR [Thread-5]: com.top_logic.layout.basic.ActivateCommand - CommandModel not executable: com.top_logic.layout.basic.ComponentCommandModel[executability:ExecutableState [executable: false, visibility: DISABLED, reason: 'class.com.top_logic.util.monitor.db.I18NConstants.NO_DATA_COLLECTED'],...
Improvement
The business reason why the tl:CommandModel in the tl:ButtonControl cannot be executed is also displayed:
junit.framework.AssertionFailedError: Command cannot be executed; no monitoring data collected Action: Reset view At file:/home/dbu/Development/workspaces/CWS_2/com.top_logic.demo/target/test-classes/test/com/top_logic/demo/scripted/TestDemo-93_StatementMonitor.xml line 513 column 6 at test.com.top_logic.layout.scripting.runtime.TestedApplicationSession.enhanceThrowable(TestedApplicationSession.java:648) ...
Test
- RunTestDemo-93_StatementMonitor.xml in the application
- Execute the second-to-last action, "Click 'Delete Ad'."
- Expected Result: The action fails, and the error message displays, among other things, “No monitoring data recorded.”