View Issue Details

IDProjectCategoryView StatusLast Update
0004212Compliance Test Tool (CTT) Unified Architecture3 - Feature Requestpublic2021-07-02 15:37
ReporterMark Clemens Assigned ToSebastian Allmendinger  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformPCOSWindowsOS Version10
Product Version1.03.340.380 
Target Version1.04Fixed in Version1.03.341.399 
Summary0004212: TransferSubscription.js library script in CTT client testing not correct and not functional
Description

It appears that there is no Test case currently using the TransferSubscription.js script from the ClientProjects library.

\ClientProjects\Standard\library\Services\SubscriptionServiceSet\TransferSubscription.js

The script is not correct and not functional.

Steps To Reproduce

Create a new test with the following content in a client test project and attempt to execute the test:

/ Test prepared by <Mark Clemens>: <markc@copadata.com>;
Description:
Injects error "Bad_SubscriptionIdInvalid" into the Service Result when calling TransferSubscriptionshHelper.
/

include( "./library/Services/SubscriptionServiceSet/TransferSubscription.js" );
TransferSubscriptionsHelper.Execute ({ ServiceResult: StatusCode.BadSubscriptionIdInvalid});

Additional Information

The script in the library can be repaired by changing the function declaration and the execute method (the this.ClearHook may also need to be modified)

function TransferSubscriptionsService()
{
this.Request = null;
this.Response = null;
this.ServiceResult = null;
this.ExternalFunction = null; // reference to an external function
this.Name = "TransferSubscriptions";
this.Event = Identifier.TransferSubscriptionsResponse;

 // Injects errors into the response stream
// NOTE TO SELF: add more parameters for injecting into response parameters
this.Execute = function( args )
{
    print( &quot;*** &quot; + this.Name + &quot; ***&quot; );
    // setup the injection parameters
    if(isDefined (args.ServiceResult)) TransferSubscriptionsHelper.ServiceResult = args.ServiceResult;

    if( isDefined( args.ExternalFunction ) ) {
        TransferSubscriptionsHelper.ExternalFunction = args.ExternalFunction;
        print( &quot;External function stored, ready for use with &quot; + Name + &quot; injection.&quot; );
    }

    // detach any existing hook, and re-attach the new one
    removeHook(TransferSubscriptionsHelper.Event );
    addHook( TransferSubscriptionsHelper.Event, TransferSubscriptionsHelper.ServiceResponseHandler );
};
TagsNo tags attached.
Files Affected

Activities

Sebastian Allmendinger

2021-06-08 12:36

developer   ~0014502

An updated version of the script has been prepared, in that the undefined variable "ServiceResult" has been replaced with the valid one "args.ServiceResult".

Paul Hunkar

2021-07-02 15:37

administrator   ~0014611

Review in cmp Call agreed to changes and closed

Issue History

Date Modified Username Field Change
2018-03-28 14:54 Mark Clemens New Issue
2018-08-30 15:04 Paul Hunkar Category Script Issue => Feature Request
2018-08-30 15:04 Paul Hunkar Assigned To => Alexander Allmendinger
2018-08-30 15:04 Paul Hunkar Status new => assigned
2019-01-10 14:40 Paul Hunkar Target Version => 1.04
2019-01-28 14:14 Paul Hunkar Category Feature Request => 3 - Feature Request
2021-06-08 12:36 Sebastian Allmendinger Assigned To Alexander Allmendinger => Sebastian Allmendinger
2021-06-08 12:36 Sebastian Allmendinger Status assigned => resolved
2021-06-08 12:36 Sebastian Allmendinger Resolution open => fixed
2021-06-08 12:36 Sebastian Allmendinger Fixed in Version => 1.03.341.399
2021-06-08 12:36 Sebastian Allmendinger Note Added: 0014502
2021-07-02 15:37 Paul Hunkar Status resolved => closed
2021-07-02 15:37 Paul Hunkar Note Added: 0014611