/AWS1/IF_REV=>GETTESTRUN()¶
About GetTestRun¶
Retrieves a test run by ID, including its status, results, and the configuration snapshotted when the run started.
Method Signature¶
METHODS /AWS1/IF_REV~GETTESTRUN
IMPORTING
!IV_TESTRUNID TYPE /AWS1/REVTESTRUNID OPTIONAL
!IV_SERVICEARN TYPE /AWS1/REVARN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_revgettestrunresponse
RAISING
/AWS1/CX_REVACCESSDENIEDEX
/AWS1/CX_REVINTERNALSERVEREX
/AWS1/CX_REVRESOURCENOTFOUNDEX
/AWS1/CX_REVVLDTNEXCEPTION
/AWS1/CX_REVCLIENTEXC
/AWS1/CX_REVSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_testrunid TYPE /AWS1/REVTESTRUNID /AWS1/REVTESTRUNID¶
The identifier of the test run to retrieve.
iv_servicearn TYPE /AWS1/REVARN /AWS1/REVARN¶
The ARN of the service the test run belongs to.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_revgettestrunresponse /AWS1/CL_REVGETTESTRUNRESPONSE¶
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->gettestrun(
iv_servicearn = |string|
iv_testrunid = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_testrun = lo_result->get_testrun( ).
IF lo_testrun IS NOT INITIAL.
lv_testrunid = lo_testrun->get_testrunid( ).
lv_testid = lo_testrun->get_testid( ).
lv_testrunstatus = lo_testrun->get_status( ).
lv_arn = lo_testrun->get_servicearn( ).
lv_timestamp = lo_testrun->get_startedat( ).
lv_timestamp = lo_testrun->get_endedat( ).
LOOP AT lo_testrun->get_experiments( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_arn = lo_row_1->get_experimentarn( ).
lv_string = lo_row_1->get_details( ).
ENDIF.
ENDLOOP.
lv_integer = lo_testrun->get_eventcount( ).
LOOP AT lo_testrun->get_parameters( ) into ls_row_2.
lv_key = ls_row_2-key.
LOOP AT ls_row_2-value into lo_row_3.
lo_row_4 = lo_row_3.
IF lo_row_4 IS NOT INITIAL.
lv_parametervalue = lo_row_4->get_value( ).
ENDIF.
ENDLOOP.
ENDLOOP.
lv_string = lo_testrun->get_errormessage( ).
LOOP AT lo_testrun->get_stopconditions( ) into lo_row_5.
lo_row_6 = lo_row_5.
IF lo_row_6 IS NOT INITIAL.
lv_stopconditionsource = lo_row_6->get_source( ).
lv_string = lo_row_6->get_value( ).
ENDIF.
ENDLOOP.
lo_loggingconfiguration = lo_testrun->get_loggingconfiguration( ).
IF lo_loggingconfiguration IS NOT INITIAL.
lv_string = lo_loggingconfiguration->get_s3bucketname( ).
lv_arn = lo_loggingconfiguration->get_cloudwatchloggrouparn( ).
lv_string = lo_loggingconfiguration->get_logschemaversion( ).
ENDIF.
lv_entityname = lo_testrun->get_rolename( ).
lv_serviceownedarn = lo_testrun->get_testtemplatearn( ).
lo_testrunreportconfigurat = lo_testrun->get_reportconfiguration( ).
IF lo_testrunreportconfigurat IS NOT INITIAL.
LOOP AT lo_testrunreportconfigurat->get_reportoutput( ) into lo_row_7.
lo_row_8 = lo_row_7.
IF lo_row_8 IS NOT INITIAL.
lo_s3reportoutputconfigura = lo_row_8->get_s3( ).
IF lo_s3reportoutputconfigura IS NOT INITIAL.
lv_s3bucketpath = lo_s3reportoutputconfigura->get_bucketpath( ).
lv_awsaccountid = lo_s3reportoutputconfigura->get_bucketowner( ).
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.
lo_testrunpolicysnapshot = lo_testrun->get_policy( ).
IF lo_testrunpolicysnapshot IS NOT INITIAL.
lv_arn = lo_testrunpolicysnapshot->get_policyarn( ).
lv_entityname = lo_testrunpolicysnapshot->get_name( ).
lo_availabilityslo = lo_testrunpolicysnapshot->get_availabilityslo( ).
IF lo_availabilityslo IS NOT INITIAL.
lv_double = lo_availabilityslo->get_target( ).
ENDIF.
lo_multiaztargets = lo_testrunpolicysnapshot->get_multiaz( ).
IF lo_multiaztargets IS NOT INITIAL.
lv_integer = lo_multiaztargets->get_rtoinminutes( ).
lv_integer = lo_multiaztargets->get_rpoinminutes( ).
lv_multiazdisasterrecovery = lo_multiaztargets->get_disasterrecoveryapproach( ).
ENDIF.
lo_multiregiontargets = lo_testrunpolicysnapshot->get_multiregion( ).
IF lo_multiregiontargets IS NOT INITIAL.
lv_integer = lo_multiregiontargets->get_rtoinminutes( ).
lv_integer = lo_multiregiontargets->get_rpoinminutes( ).
lv_multiregiondisasterreco = lo_multiregiontargets->get_disasterrecoveryapproach( ).
ENDIF.
lo_datarecoverytargets = lo_testrunpolicysnapshot->get_datarecovery( ).
IF lo_datarecoverytargets IS NOT INITIAL.
lv_integer = lo_datarecoverytargets->get_timebetweenbackupsinmins( ).
ENDIF.
ENDIF.
lo_reportgenerationresult = lo_testrun->get_reportoutput( ).
IF lo_reportgenerationresult IS NOT INITIAL.
lv_reporttype = lo_reportgenerationresult->get_reporttype( ).
lv_reportgenerationstatus = lo_reportgenerationresult->get_status( ).
lv_arn = lo_reportgenerationresult->get_servicearn( ).
lv_uuid = lo_reportgenerationresult->get_assessmentid( ).
lv_testrunid = lo_reportgenerationresult->get_testrunid( ).
lv_serviceownedarn = lo_reportgenerationresult->get_testtemplatearn( ).
lv_timestamp = lo_reportgenerationresult->get_createdat( ).
lo_reportoutput = lo_reportgenerationresult->get_reportoutput( ).
IF lo_reportoutput IS NOT INITIAL.
lo_s3reportoutput = lo_reportoutput->get_s3reportoutput( ).
IF lo_s3reportoutput IS NOT INITIAL.
lv_string = lo_s3reportoutput->get_s3objectkey( ).
ENDIF.
lo_failedreportoutput = lo_reportoutput->get_failedreportoutput( ).
IF lo_failedreportoutput IS NOT INITIAL.
lv_reportgenerationerrorco = lo_failedreportoutput->get_errorcode( ).
lv_string = lo_failedreportoutput->get_errormessage( ).
ENDIF.
ENDIF.
ENDIF.
lv_arn = lo_testrun->get_regionswitchplanarn( ).
lv_regionswitchexecutionid = lo_testrun->get_regionswitchexecutionid( ).
lo_permissionmodel = lo_testrun->get_permissionmodel( ).
IF lo_permissionmodel IS NOT INITIAL.
lv_iamrolename = lo_permissionmodel->get_invokerrolename( ).
LOOP AT lo_permissionmodel->get_crossaccountroles( ) into lo_row_9.
lo_row_10 = lo_row_9.
IF lo_row_10 IS NOT INITIAL.
lv_iamrolearn = lo_row_10->get_crossaccountrolearn( ).
lv_string = lo_row_10->get_externalid( ).
ENDIF.
ENDLOOP.
ENDIF.
LOOP AT lo_testrun->get_regions( ) into lo_row_11.
lo_row_12 = lo_row_11.
IF lo_row_12 IS NOT INITIAL.
lv_awsregion = lo_row_12->get_value( ).
ENDIF.
ENDLOOP.
lv_accounttargeting = lo_testrun->get_accounttargeting( ).
ENDIF.
ENDIF.