blob: 089cd0d9b9f4832af0d9390b5e22785c6df71a84 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<org.eclipse.epf.uma:TaskDescription xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI" xmlns:org.eclipse.epf.uma="http://www.eclipse.org/epf/uma/1.0.5/uma.ecore"
xmlns:rmc="http://www.ibm.com/rmc" rmc:version="7.5.0" xmlns:epf="http://www.eclipse.org/epf"
epf:version="1.5.0" xmi:id="-l9UMxPIZrGi8cIWuAJ4OBQ"
name=",_mDL5YGhkEd-FVuzXjnvIWA" guid="-l9UMxPIZrGi8cIWuAJ4OBQ" changeDate="2010-05-25T18:29:17.875-0700">
<mainDescription>&lt;p>&#xD;
The recommended approach is to consider a rule-set as a unit piece of functionality that gets exposed to the rest of&#xD;
the application as a decision service (SOA pattern). Therefore it should be tested using the same strategy as for any&#xD;
other function in the system. One criterion of rule testing lies in the level of user friendliness that should be built&#xD;
into the test harness. Indeed, empowering business analysts with the ability to change the rules also means they should&#xD;
be tested with their changes. Typically developers code fixtures and do automated testing using JUnit. Business&#xD;
analysts should not write code, but should be able to put together fixtures to be tested against the rules.&#xD;
&lt;/p>&#xD;
&lt;p>&#xD;
How much effort should be spent on the rule test harness really depends on the application, and also importantly on the&#xD;
IT-level of business analyst. Sometimes capturing test data in XML and having business analysts edit them is enough and&#xD;
very cost effective. Sometimes business analysts will feel more comfortable with Excel spreadsheets, or with a full GUI&#xD;
which would need a larger development effort to be facilitated.&lt;br />&#xD;
It is usually a good idea whenever possible to keep individual test case data in files that can be put under source&#xD;
code management. This way the code base, the rules and the test cases can be kept in sync. This becomes important when&#xD;
multiple versions of a business rule are being worked on at different stages such as active development stage, test&#xD;
stage or production stage.&lt;br />&#xD;
BRMS testing fits perfectly into this strategy due to its ability to produce the same sort of test fixtures as the&#xD;
other environments. Utilizing a tool such as JUnit as the test controller, test fixtures are stored in a test fixture&#xD;
repository for which the JUnit can access.&#xD;
&lt;/p>&#xD;
&lt;h5>&#xD;
Testing Levels&lt;br />&#xD;
&lt;/h5>&#xD;
&lt;p>&#xD;
The following levels of testing are usually applied during the application construction:&lt;br />&#xD;
&lt;/p>&#xD;
&lt;ul>&#xD;
&lt;li>&#xD;
Unit Test: applied to test classes and other application elements as developers build them. In the context of a&#xD;
BRMS, the goal of unit testing is to make sure that a rule is actually fired when expected, against the expect&#xD;
object instances and performs the expected working memory updates.&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
Component Test: applied to test a group of elements (e.g. classes) which together represent a significant&#xD;
application component. In the context of a BRMS, a component is typically a rule service.&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
System Test: applied to test the system performs the right business functions correctly.&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
Acceptance Test: applied to ensure users are satisfied with the system. The last stages of acceptance testing are&#xD;
the alpha testing (testing performed internally by the company) and beta testing (testing performed by a limited&#xD;
audience outside of the company).&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
The scope of this section is limited to unit-test (usually performed by rule developers) and component test&#xD;
(performed by both rule developers and rule authors), where components are understood as the rule services&#xD;
implemented by a rule engine.&#xD;
&lt;/li>&#xD;
&lt;/ul>&#xD;
&lt;p>&#xD;
Once the rule service components are tested, the next levels can follow the general application testing process&#xD;
followed by the client's QA department, who are considering the rule services as black boxes.&lt;br />&#xD;
&lt;/p>&#xD;
&lt;h5>&#xD;
Testing Activities&#xD;
&lt;/h5>&#xD;
&lt;p>&#xD;
This section relates to why testing is performed, that is what we are trying to get out of it. The goal of testing the&#xD;
decision service components is first and foremost to ensure the correctness of the decision rendered by the service&#xD;
with respect to the requirements.&lt;br />&#xD;
Key Performance Indicators (KPIs) are used to measure how close the actual test results are from the expectations. The&#xD;
focus of KPIs vary depending on the type of testing performed: for performance testing, the KPIs will obviously be&#xD;
interested in the time taken to execute the rules or tasks in the rule-set, for coverage, the focus will be on the set&#xD;
of rule fired and the set of tasks executed, and for more business-oriented testing of correctness, the focus will be&#xD;
on the accuracy of the response.&lt;br />&#xD;
&lt;/p>&#xD;
&lt;h5>&#xD;
Correctness&lt;br />&#xD;
&lt;/h5>&#xD;
&lt;p>&#xD;
For a decision-rich type of application, this is where most of the testing time and effort will be spent, using all&#xD;
types of resources from developers, to business analysts, to business rule writers and subject matter experts.&lt;br />&#xD;
The goal here is to ensure that for a given request configuration, the system renders a response that conforms to the&#xD;
company business goals and policies, contractual obligations and possibly to compliance rules imposed by external&#xD;
agencies (laws and regulations). The impact of an incorrect decision can be profound, from lawsuits for non-compliance&#xD;
to risky financial commitments.&lt;br />&#xD;
Testing the correctness of a business rules application necessarily involves the participation of SMEs, who will write&#xD;
test cases and manually produce the expected response. This is a very time and resource consuming activity which should&#xD;
be carefully taken into account when designing the test plan for an application.&lt;br />&#xD;
Alternatively, some test cases can be extracted from a legacy system database. The benefit here is obvious: the&#xD;
database provides the number and the variety of test cases needed, and also guarantees the validity of the test&#xD;
cases.&lt;br />&#xD;
&lt;/p>&#xD;
&lt;h5>&#xD;
Regression&lt;br />&#xD;
&lt;/h5>&#xD;
&lt;p>&#xD;
The goal of regression testing is to uncover regression problems, that is, problems which were not present in the&#xD;
previous version of the application but appeared in the new version after a change was introduced. Regression testing&#xD;
for rules is used to make sure that after fixing, or updating a rule service, the functionalities which were working&#xD;
before are still working as expected. For example, after implementing a business change request which lowers the rates&#xD;
in the state of California, regression testing should be applied to ensure that rates remained unchanged in all other&#xD;
states.&lt;br />&#xD;
Besides verifying that correctness is conserved from one version to another, regression testing is also used to verify&#xD;
that quality (for example, execution performance) is conserved.&lt;br />&#xD;
&lt;/p></mainDescription>
</org.eclipse.epf.uma:TaskDescription>