Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebot seems not to run in dockerimage #379

Open
peterfranssen opened this issue Dec 21, 2021 · 1 comment
Open

Rebot seems not to run in dockerimage #379

peterfranssen opened this issue Dec 21, 2021 · 1 comment

Comments

@peterfranssen
Copy link

peterfranssen commented Dec 21, 2021

Describe the bug
I tried to follow the steps in of the earlier reported issues in about rerunning failed tests. The rerunning is working fine, but it seems not to merge the results and produces additional logging

To Reproduce
Currently I managed to get below code running, including running failed tests. I assume the issue is somewhere in grabbing the output files from the correct path and merging them. Both the output files are created in the reports directory.

docker run --rm \
  -v ${PWD}/reports:/opt/robotframework/reports:Z \
  -v ${PWD}/rfafricapwa/tests:/opt/robotframework/tests:Z \
  --mount type=bind,source=${PWD}/rfafricapwa/resources,target=/opt/robotframework/resources \
  --user $(id -u):$(id -g) \
  ppodgorsek/robot-framework:latest ||
      
docker run --rm \
  -v ${PWD}/reports:/opt/robotframework/reports:Z \
  -v ${PWD}/rfafricapwa/tests:/opt/robotframework/tests:Z \
  --mount type=bind,source=${PWD}/rfafricapwa/resources,target=/opt/robotframework/resources \
  -e ROBOT_OPTIONS="--rerunfailed /opt/robotframework/reports/output.xml -o output2.xml" \
  --user $(id -u):$(id -g) \
  ppodgorsek/robot-framework:latest ||
  
docker run --rm \
  -v ${PWD}/reports:/opt/robotframework/reports:Z \
  -e REBOT_OPTIONS="-d /opt/robotframework/reports -l logpaadesktop -x junitoutput --merge /opt/robotframework/reports/output*.xml" \
  --user $(id -u):$(id -g) \
  ppodgorsek/robot-framework:latest

The part which uploads the reports to Git Hub Actions:

# Publish testresults to Github Actions
        - name: Publish Unit Test Results
          uses: mikepenz/action-junit-report@v2
          if: always()
          with:
            report_paths: ${{ github.workspace }}/reports/*.xml
            update_check: true
            check_name:   "SK AF PWA - Daily Regression Test"
        # upload test reports as a zip file
        - name: Upload reports
          uses: actions/upload-artifact@v1
          if: always()
          with:
            name: reports
            # set path to Robot Framework results reports. Exclude dummy file that is needed because of ppodgorsek image priviledges.
            path: ${{ github.workspace }}/reports

image

image

@VMM-Mtech
Copy link

To me it seems that there are no entrypoints in this dockerfile to run the rebot command at all. So although you can give REBOT_OPTIONS, the rebot command is never actually run.

See Issue 300 if you're willing to create your own fork (there seems to be some samples).

My solution was to run the rebot outside the docker image, although it requires me to install the robot in the server where I run the docker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants