Bug 1009050 - Test Scenarios cannot run with invalid .drl file in the project
Summary: Test Scenarios cannot run with invalid .drl file in the project
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ER5
: 6.0.0
Assignee: Toni Rikkola
QA Contact: Zuzana Krejčová
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-17 14:44 UTC by Zuzana Krejčová
Modified: 2016-08-01 01:08 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-06 20:15:44 UTC
Type: Bug


Attachments (Terms of Use)
exception stacktrace (9.14 KB, text/x-log)
2013-09-17 14:44 UTC, Zuzana Krejčová
no flags Details
error popup (24.59 KB, image/png)
2013-09-17 14:45 UTC, Zuzana Krejčová
no flags Details

Description Zuzana Krejčová 2013-09-17 14:44:36 UTC
Created attachment 798849 [details]
exception stacktrace

Description of problem:
Having an invalid .drl file in the project prevents you from running any Test Scenario. It will fail with "Unable to complete your request. The following exception occurred: null." message.


Version-Release number of selected component (if applicable):
BPMS 6.0 ER3


Steps to Reproduce:
1. Create a new DRL file.
2. Append 'asd;' and save. (Optionally validate and dismiss validation errors.)
3. Create a new Test Scenario. Save it, run it.

Comment 1 Zuzana Krejčová 2013-09-17 14:45:19 UTC
Created attachment 798850 [details]
error popup

Comment 2 Zuzana Krejčová 2013-09-18 08:48:58 UTC
The real cause of TS failing is that the project cannot be built. Invalid DRL is just one possible cause of this.

Comment 3 Edson Tirelli 2013-10-01 12:51:39 UTC
Can we safely exclude assets with errors from the kbase build? Does it make sense in a rules/processes project to do that?

Comment 4 Zuzana Krejčová 2013-10-01 15:36:59 UTC
(In reply to Edson Tirelli from comment #3)
> Can we safely exclude assets with errors from the kbase build? Does it make
> sense in a rules/processes project to do that?

Perhaps in the incremental build only? Although it might still cause problems - how about I manage to create a rule with errors and then create another rule that will extend it.

If you do exclude assets with errors from the regular build (the one that the user can directly request from the project screen), please, also include some warning visible to the user.

Comment 6 Toni Rikkola 2013-10-07 11:09:41 UTC
Shouldn't it fail? The test scenarios are meant to test the knowledge base. If the kbase can not be built, then none of the test scenarios should pass.

The way we notify about this currently is something different. I don't think we should use the error popup for compile errors. They should be reported in the Problems screen.

Comment 7 Zuzana Krejčová 2013-10-07 14:14:52 UTC
(In reply to Toni Rikkola from comment #6)
> Shouldn't it fail? The test scenarios are meant to test the knowledge base.
> If the kbase can not be built, then none of the test scenarios should pass.
> 
> The way we notify about this currently is something different. I don't think
> we should use the error popup for compile errors. They should be reported in
> the Problems screen.

Good point. 

In that case, the Reporting panel should contain some kind of message that the Test Scenario failed, because the kbase couldn't be built - if it is meant to test that. Because in that case, this is a normal result, same as success and same as failure due to e.g. rule not being fired.

If the Test Scenarios are meant to test whether the kbase is buildable, it should also be obvious from the way it handles such errors.

Similar information about the failed build or rather the reasons for it belongs to the Problems panel as well. (Something should already be there, but due to other reported bugs, it usually isn't visible now.)

Pop-up definitely isn't a good idea for this nor is the message currently displayed in it.

Comment 11 manstis 2013-10-22 13:28:35 UTC
Test Scenario's "Reporting Panel" now marks tests as failed if kie-wb was unable to obtain build the project and gives an indication of actions for the user to follow.

Comment 12 Zuzana Krejčová 2013-12-10 09:43:49 UTC
Verified with ER5 - the Reporting panel now shows the message "Unable to get a Session to run tests. Check the project for build errors." and the Problems panel correctly reports troubles with the .drl file.

Thanks!


Note You need to log in before you can comment on or make changes to this bug.