Commit 62bfe068 authored by lopezaguilar's avatar lopezaguilar
Browse files

Adding automatic generation of initial_setup based on the setup operations of the test cases

parent c25a750d
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
<component name="ProjectRunConfigurationManager">
  <configuration default="false" name="Check Initial Setup" type="PythonConfigurationType" factoryName="Python">
    <module name="ngsi-ld-test-suite" />
    <option name="ENV_FILES" value="" />
    <option name="INTERPRETER_OPTIONS" value="" />
    <option name="PARENT_ENVS" value="true" />
    <envs>
      <env name="PYTHONUNBUFFERED" value="1" />
    </envs>
    <option name="SDK_HOME" value="" />
    <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/doc/analysis" />
    <option name="IS_MODULE_SDK" value="true" />
    <option name="ADD_CONTENT_ROOTS" value="true" />
    <option name="ADD_SOURCE_ROOTS" value="true" />
    <EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
    <option name="SCRIPT_NAME" value="$PROJECT_DIR$/doc/analysis/initial_setup.py" />
    <option name="PARAMETERS" value="" />
    <option name="SHOW_COMMAND_LINE" value="false" />
    <option name="EMULATE_TERMINAL" value="false" />
    <option name="MODULE_MODE" value="false" />
    <option name="REDIRECT_INPUT" value="false" />
    <option name="INPUT_FILE" value="" />
    <method v="2" />
  </configuration>
</component>
 No newline at end of file
+4 −4
Original line number Diff line number Diff line
@@ -6,8 +6,8 @@ Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.re
Resource            ${EXECDIR}/resources/AssertionUtils.resource
Resource            ${EXECDIR}/resources/JsonUtils.resource

Suite Setup         Setup Initial Entities
Suite Teardown      Delete Initial Entities
Suite Setup         Setup Initial Entity
Suite Teardown      Delete Initial Entity


*** Variables ***
@@ -28,7 +28,7 @@ ${filename}= building-simple-attributes-sample.json


*** Keywords ***
Setup Initial Entities
Setup Initial Entity
    ${entity_id}=    Generate Random Entity Id    ${building_id_prefix}
    Create Entity Selecting Content Type
    ...    ${filename}
@@ -37,5 +37,5 @@ Setup Initial Entities
    ...    ${ngsild_test_suite_context}
    Set Suite Variable    ${entity_id}

Delete Initial Entities
Delete Initial Entity
    Delete Entity by Id    ${entity_id}
+4 −4
Original line number Diff line number Diff line
@@ -6,8 +6,8 @@ Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.re
Resource            ${EXECDIR}/resources/AssertionUtils.resource
Resource            ${EXECDIR}/resources/JsonUtils.resource

Suite Setup         Setup Initial Entities
Suite Teardown      Delete Initial Entities
Suite Setup         Setup Initial Entity
Suite Teardown      Delete Initial Entity


*** Variables ***
@@ -26,7 +26,7 @@ ${expectation_file}= types/expectations/attribute-027-01-expectation.json


*** Keywords ***
Setup Initial Entities
Setup Initial Entity
    ${entity_id}=    Generate Random Entity Id    ${building_id_prefix}
    Create Entity Selecting Content Type
    ...    ${filename}
@@ -35,5 +35,5 @@ Setup Initial Entities
    ...    ${ngsild_test_suite_context}
    Set Suite Variable    ${entity_id}

Delete Initial Entities
Delete Initial Entity
    Delete Entity by Id    ${entity_id}
+4 −4
Original line number Diff line number Diff line
@@ -6,8 +6,8 @@ Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.re
Resource            ${EXECDIR}/resources/AssertionUtils.resource
Resource            ${EXECDIR}/resources/JsonUtils.resource

Test Setup          Setup Initial Entities
Test Teardown       Delete Initial Entities
Test Setup          Setup Initial Entity
Test Teardown       Delete Initial Entity
Test Template       Retrieve Available Attributes


@@ -34,7 +34,7 @@ Retrieve Available Attributes
    Check Response Status Code    200    ${response.status_code}
    Check Response Body Containing AttributeList element    ${expectation_file}    ${response.json()}

Setup Initial Entities
Setup Initial Entity
    ${entity_id}=    Generate Random Entity Id    ${building_id_prefix}
    Create Entity Selecting Content Type
    ...    ${filename}
@@ -43,5 +43,5 @@ Setup Initial Entities
    ...    ${ngsild_test_suite_context}
    Set Test Variable    ${entity_id}

Delete Initial Entities
Delete Initial Entity
    Delete Entity by Id    ${entity_id}
+4 −4
Original line number Diff line number Diff line
@@ -6,8 +6,8 @@ Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.re
Resource            ${EXECDIR}/resources/AssertionUtils.resource
Resource            ${EXECDIR}/resources/JsonUtils.resource

Test Setup          Setup Initial Entities
Test Teardown       Delete Initial Entities
Test Setup          Setup Initial Entity
Test Teardown       Delete Initial Entity
Test Template       Retrieve Details Of Available Attributes


@@ -35,7 +35,7 @@ Retrieve Details Of Available Attributes
    Check Response Status Code    200    ${response.status_code}
    Check Response Body Containing Attribute element    ${expectation_file}    ${response.json()}

Setup Initial Entities
Setup Initial Entity
    ${entity_id}=    Generate Random Entity Id    ${building_id_prefix}
    Create Entity Selecting Content Type
    ...    ${filename}
@@ -44,5 +44,5 @@ Setup Initial Entities
    ...    ${ngsild_test_suite_context}
    Set Test Variable    ${entity_id}

Delete Initial Entities
Delete Initial Entity
    Delete Entity by Id    ${entity_id}
Loading