CREATE_TEST_CASE SAP Method Create a test case
Below is documentation, parameters and attributes of ABAP Method CREATE_TEST_CASE within SAP class IF_FDT_TEST_TOOL. There is also a number of example ABAP code snipts to help you use the functionality of this method.
This method is available within SAP systems depending on your version and release level, you can view further information by entering the class name IF_FDT_TEST_TOOL into the relevant SAP transactions such as SE24 or SE80, and then selecting the method you are interested in.
Method Type - Instance
This is an Instance Method so needs to be instantiated first before you can access any of the methods. I.e. you need to create a local variable of TYPE ref to the class.The following technical details of method CREATE_TEST_CASE can also be found below:
- Importing parameters
- Exporting parameters
- Changing parameters
- Returning parameters
- Exceptions
- Coding Examples
Parameters of Method CREATE_TEST_CASE
.| Name | Type | Data Type | Description | Default Value |
| IO_EXPECTED_CONTEXT | Importing | TYPE REF TO IF_FDT_CONTEXT | Expected context (after execution) | |
| IO_EXPECTED_RESULT | Importing | TYPE REF TO IF_FDT_RESULT | Expected result (after execution) | |
| IO_INPUT_CONTEXT | Importing | TYPE REF TO IF_FDT_CONTEXT | Input context | |
| IS_RESULT_OPTIONS | Importing | TYPE S_RES_OPTIONS | Comparison options for expected results | |
| IV_COMPARE_CONTEXT | Importing | TYPE ABAP_BOOL | 'X' = compare context after execution | |
| IV_DESCRIPTION | Importing | TYPE IF_FDT_TYPES=>TEXT | Description | |
| IV_DOCUMENTATION | Importing | TYPE STRING | Documentation | |
| IV_FUNCTION_ID | Importing | TYPE IF_FDT_TYPES=>ID | Function ID | |
| IV_NAME | Importing | TYPE IF_FDT_TYPES=>NAME | Test Case Name | |
| ET_ERROR | Exporting | TYPE IF_FDT_TYPES=>T_MESSAGE | Error messages |
Exceptions of Method CREATE_TEST_CASE
This method does not have any exceptionsExample ABAP coding
DATA: lo_class TYPE REF TO IF_FDT_TEST_TOOL.
DATA: lv_ET_ERROR TYPE IF_FDT_TYPES=>T_MESSAGE,
lv_IO_EXPECTED_CONTEXT TYPE IF_FDT_CONTEXT,
lv_IO_EXPECTED_RESULT TYPE IF_FDT_RESULT,
lv_IO_INPUT_CONTEXT TYPE IF_FDT_CONTEXT,
lv_IS_RESULT_OPTIONS TYPE S_RES_OPTIONS,
lv_IV_COMPARE_CONTEXT TYPE ABAP_BOOL,
lv_IV_DESCRIPTION TYPE IF_FDT_TYPES=>TEXT,
lv_IV_DOCUMENTATION TYPE STRING,
lv_IV_FUNCTION_ID TYPE IF_FDT_TYPES=>ID,
lv_IV_NAME TYPE IF_FDT_TYPES=>NAME,
lv_other TYPE c.
CALL METHOD lo_class=>CREATE_TEST_CASE(
EXPORTING
IO_EXPECTED_CONTEXT = lv_IO_EXPECTED_CONTEXT
IO_EXPECTED_RESULT = lv_IO_EXPECTED_RESULT
IO_INPUT_CONTEXT = lv_IO_INPUT_CONTEXT
IS_RESULT_OPTIONS = lv_IS_RESULT_OPTIONS
IV_COMPARE_CONTEXT = lv_IV_COMPARE_CONTEXT
IV_DESCRIPTION = lv_IV_DESCRIPTION
IV_DOCUMENTATION = lv_IV_DOCUMENTATION
IV_FUNCTION_ID = lv_IV_FUNCTION_ID
IV_NAME = lv_IV_NAME
IMPORTING
ET_ERROR = lv_ET_ERROR ).
Links to Related Class(s)
IF_FDT_T...Full list of available SAP object classes
Search for further information about these or an SAP related objects