summaryrefslogtreecommitdiffstats
path: root/robot/resources/clamp_interface.robot
blob: 0adabd739df8281e6fcff930cdfe63e168527382 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
*** Settings ***
Documentation     The main interface for interacting with Microservice Bus.
Library           RequestsLibrary

Resource          global_properties.robot

*** Variables ***
${CLAMP_HEALTH_CHECK_PATH}        /restservices/clds/v1/healthcheck
${CLAMP_ENDPOINT}     ${GLOBAL_CLAMP_SERVER_PROTOCOL}://${GLOBAL_INJECTED_CLAMP_IP_ADDR}:${GLOBAL_CLAMP_SERVER_PORT}


*** Keywords ***
Run CLAMP Health Check
     [Documentation]    Runs CLAMP Health check
     ${resp}=    Run CLAMP Get Request    ${CLAMP_HEALTH_CHECK_PATH}
     Should Be Equal As Integers  ${resp.status_code}   200

Run CLAMP Get Request
     [Documentation]    Runs CLAMP Get request
     [Arguments]    ${data_path}
     ${session}=    Create Session  session   ${CLAMP_ENDPOINT}
     ${resp}=   Get Request   session   ${data_path}
     Should Be Equal As Integers  ${resp.status_code}   200
     Log    Received response from CLAMP ${resp.text}
     [Return]    ${resp}
"c"><!-- Prepares the property pointing to the JaCoCo runtime agent which is passed as VM argument when Maven the Surefire plugin is executed. --> <execution> <id>pre-unit-test</id> <goals> <goal>prepare-agent</goal> </goals> <configuration> <!-- Sets the path to the file which contains the execution data. --> <destFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</destFile> <!-- Sets the name of the property containing the settings for JaCoCo runtime agent. --> <propertyName>surefireArgLine</propertyName> </configuration> </execution> <!-- Ensures that the code coverage report for unit tests is created after unit tests have been run. --> <execution> <id>post-unit-test</id> <phase>test</phase> <goals> <goal>report</goal> </goals> <configuration> <!-- Sets the path to the file which contains the execution data. --> <dataFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</dataFile> <!-- Sets the output directory for the code coverage report. --> <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory> </configuration> </execution> </executions> </plugin> </plugins> </build> </project>