[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: [ebxml-iic] RE: sample 3 test cases
Mike:
[Jacques4]
- -----Original Message-----
- From: Michael Kass [mailto:michael.kass@nist.gov]
- Sent: Wednesday, October 02, 2002 12:59 PM
- To: Jacques Durand; Jacques Durand
- Cc: ebxml-iic@lists.oasis-open.org
- Subject: RE: sample 3 test cases
- At 11:58 AM 10/2/2002 -0700, Jacques Durand wrote:
- Mike, in-line.
- Jacques
- -----Original Message-----
- From: Michael Kass [mailto:michael.kass@nist.gov]
- Sent: Tuesday, October 01, 2002 8:16 PM
- To: Jacques Durand
- Cc: ebxml-iic@lists.oasis-open.org
- Subject: RE: sample 3 test cases
- At 04:38 PM 10/1/2002 -0700, Jacques Durand wrote:
- [MIKE3] - With the idea of assigning configuration parameters at the "step" level, we can do that in both the abstract and real test <TestStep>s. <TestStep> ( a column name in the abstract test descriptions 0 is a container element in XML. We could then add additional parameters like: <TestStep id='1' timeout='60'/>... or <TestStep id='2' timeout=120' represented tabularly in the "Test Step" column of the abstract test suite as id='1' timeout='120' We could have a default value of, say '10' for all step timeouts, that would be overridden by an explicit timeout declaration in the <TestStep>.
- Comments?
- [Jacques3] sounds fine. Believe we need to set the defaults at test suite level - (little value doing this at Test Case level)
- So could we have a special container that identifies a test Suite as:
- (1) a set of initial and default config parameters (e.g. default timeout for all "Put" steps, amybe a different one for "Get" steps)
- (2) a set of predefined CPAs used by the Test Cases. (could be described as plain list of name-value pairs using yours CPA attribute names, abstracting CPA mark-up for now.)
- (3) message material (header templates, payloads...)
- (4) a list of references to actual Test Cases that are part of this test suite (something close to the "master" file of Matt intended to define conformance levels?, Or, this master file could actually be the ultimate Test Suite container.)
- 1) Regarding your other comments for the 3 abstract tests.. I agree that <Condition>
- should be changed to <Precondition>. It has a more direct meaning in a testing sense.
- 2) I will fix the typos on the "quotes"
- 3) Regarding either :
- (a) Using predifined CPAs for the "configurator" action, or
- (b) using CPA "templates" and manipulating them like any other message content...
- I would favor (b) simply for the expediency. Or at least, I think that we should leave that possibility open in our implementation
- design. That way, if the number of CPA templates becomes cumbersome, we could treat the CPA
- as just another payload, and manipulate that XML payload template content the same way we would manipulate
- an XML payload template for say ... ebXML Registry testing.
- [Jacques ] I would also try to avoid using Configurator action.... . (Configurator action assumes the MSH is
Comments?- capable to dynamically handle new CPAs, which may complicate things API-wise, may not be true of all MSH, etc.
- But we may still assume that all the CPAs we need are in reasonable number and pre-installed / accessible...
- (that would be the simplest solution)
- Only in case there are too many of these, (or too many combinations of
- CPA attributes to consider in our test cases) we will have to specify how to generate
- non-preinstalled CPAs from a template - and that could just be an XPath assignment in a sub-operation, like for header manipulations. In that case only, we would need the Configurator, to deploy on a the MSH local to this Test Service.
- But I'd say we might not need do that if we don't need more than 20 or 30 CPAs, which is still a reasonable
- number of predefined CPAs...
- [MIKE2] - So what we are talking about as far as configurating an MSH using CPAs is a "startup" mode, in which the
- candidate MSH starts up, reads a CPA ( or CPA-like config file ) and configures itself. We are assuming no "dynamic" ability of an MSH to
- alter its configuration once started. Which means that all tests that must be run must assume that particular CPA configuration.
- [Jacques2] well, in the simplest solution mentioned above, an MSH should be able to access/use
- several CPAs at any time, based on the CPAId in messages.
- All these CPAs would be set (and possibly known from MSH) prior to running the test suite - may need a pre-configuration phase, but that really depends on the MSH implementation (instead, CPAs could be preinstalled in a registry, and MSH only needs to access them on demand, at run-time, and cache them).
- At test suite level, we only need to specify a list of these CPAs (or CPAIds) needed by our test suite. Each test case will typically use no more than one CPA, but if we need to switch in the middle, that just means typically sending a message (m1, CPAId_1) to the Initiator action, such that this action will generate a message (m2, CPAId_2).
- We only need to change the CPAId in the message, for the MSH to know what to do.
- A CPA would never change, once "installed" and referenced by a CPAId.
- So that is the least constraining way for the MSH... in case we really need to dynamically craft and add new CPAs, the COnfigurator service action would be needed. But that makes more assumptions on the ability of the MSH. I don't believe we need that for now...
[MIKE3] - I see. Well, this will work. Basically we are saying "here is the CPAId", we both ( TestDriver and Candidate MSH) know what it means, but how we each describe it to our MSH is different. The key here will be absolute understanding what each CPAId means to both parties. Otherwise, conformance testing falls apart. That is the benefit of having everyone work from the same file syntax, whether it is a CPA or "MiniCPA". Everyone agrees. There is no ambiguity.
Test wise, as long as both the Test Driver and candidate MSH both know that they are working from the same CPA, any discrepencies should be caught by good test writing... i.e.. if my Message Expression is <Precondition> $CPA_DuplicateElimination=='true' </Precondition> but the current CPA has DuplicationElimination set to false' then the <Precondition> will throw a "FatalPrecondition" exception, which willl trigger an end to the <TestStep>. The test cannot proceed because of an incompatability between the CPA and the test <Precondition>. This will work.
[Jacques3] these $CPA_parameters like $CPA_DuplicateElimination, do they represent message element or CPA elements?
I believe its message element, right? In that case we are in sync. Because I think there is no need to test the value of CPA elements, if we assume the CPAs are well known and identified by the CPAId ref.
There is also one thing we need to consider: we may not impose the CPAId format to an implementation,
and in fact is under control of the users (e.g. EAN will have its own format, etc.).
So if we use CPAId refs like "cpa_01", "cpa_02"... in our test cases,
it is not sure we can impose these identifiers to the candidate MSH. It could be users have already
decided their CPAId would be like, say, "EAN_CPA_1234" or "EAN_CPA_2345".
Because of this, our CPAId values we use in our Test Cases should be considered as "formal parameter",
to be substituted by real CPAId values when executing the test suite.
There should then be some "CPA mapping statements" (same as parameter instantiation) as part of
configuration of a test suite for a test run: CPA:cpa_123 = "EAN_CPA_1234", etc.
<TestStep id='2' party="TestDriver">
<GetMessage description="Correlate returned message">
/SOAP:Envelope/SOAP:Header/eb:MessageHeader/eb:CPAId==$CPA_Id and/SOAP:Envelope/SOAP:Header/eb:MessageHeader/eb:ConversationId=='$ConversationId' and /SOAP:Envelope/SOAP:Header/eb:MessageHeader/eb:MessageData/RefToMessageId=='$MessageId
<Precondition description="Test that CPA has DuplicateElimination is set to 'never'">
<ErrorMessage>CPA does not have DuplicateElimination set to 'never'</ErrorMessage>
$CPA_DuplicateElimination == 'never'
</PreCondition>
<ConformanceCondition description="Check for DuplicateElimination element not present in message">
<ErrorMessage>DuplicateElimination element found in returned message</ErrorMessage>
//eb:DuplicateElimination[count() == 0]
</ConformanceCondition>
</GetMessage>
</TestStep>
Se we use the test Precondition to verify that we are indeed using a CPA that is set properly, prior to doing the conformance test. If for some reason
( say a test writer chose CPA_Id=5 instead of CPA_Id=6 ) and CPA_Id 6 does not have DuplicateElimination set to 'never".. the test will catch that,
throw a fatalPrecondition exception, terminate the <TestStep> and terminate the <TestCase> with a status of "untested".
Following our <Precondition>...<ConformanceCondition> pattern that we describe in our abstract test cases makes sense, and also improves
readability of test cases. Hiding all of the CPA configuration behind a CPA_Id and assuming that we are using the right one is something we should
avoid when describing tests I believe.
[Jacques4] (see previous comments) we cannot try to catch every possibility of mishaps by test wrtiter... or else, you would have to check every CPA value... besides, testing that the references CPA has the right values, may not be
easy: some MSH refs will not let you query the CPA content they use.
Comments?
- Cheers,
- jacques
- .
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC