Enhancement
Detail
#27281
ApplicationTesting: Better error message for non-executable commands
If a test is executed and a command is not executable (a button cannot be pressed), currently only the error message:
Command not executable
is displayed in the error message. Why the command is not executable can only be found out 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 technical reason why the tl:CommandModel cannot be executed in the tl:ButtonControl is still output:
junit.framework.AssertionFailedError: command not executable No monitoring data captured 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 penultimate action "Click 'Clear display'."
- Expectation: the action fails and the error message displays, among other things, "No monitoring data collected".