Skip to content
Snippets Groups Projects
Commit a1b8491a authored by Grzegorz Rola's avatar Grzegorz Rola
Browse files

feature(reportportal): export tests reports to reportportal

parent 3b952b4d
No related branches found
No related tags found
No related merge requests found
......@@ -60,6 +60,7 @@
- vendor/bin/codecept run acceptance $PARALLEL_JOB --steps --xml --html -f --verbose
after_script:
- rm -r ${APACHE_DOCUMENT_ROOT}
- 'if [[ ${REPORTPORTAL_AUTHORIZATION} && ${REPORTPORTAL_PROJECT} ]]; then curl -X POST "http://195.201.225.204:8080/api/v1/${REPORTPORTAL_PROJECT}/launch/import" -H "accept: */*" -H "Content-Type: multipart/form-data" -H "${REPORTPORTAL_AUTHORIZATION}" -F "file=@tests/codeception/tests/_output/report.xml;type=text/xml;filename=${CI_PROJECT_NAME}-${CI_COMMIT_REF_SLUG}-codeception.xml"; fi'
.template: &job-codeception-test-parallel-auto
<<: *job-codeception-test-parallel
......@@ -88,6 +89,7 @@
- cp vendor/wpdesk/wp-codeception/configuration/codeception-with-recorder.dist.yml codeception-with-recorder.dist.yml
after_script:
- rm -r ${APACHE_DOCUMENT_ROOT}
- 'if [[ ${REPORTPORTAL_AUTHORIZATION} && ${REPORTPORTAL_PROJECT} ]]; then curl -X POST "http://195.201.225.204:8080/api/v1/${REPORTPORTAL_PROJECT}/launch/import" -H "accept: */*" -H "Content-Type: multipart/form-data" -H "${REPORTPORTAL_AUTHORIZATION}" -F "file=@tests/codeception/tests/_output/report.xml;type=text/xml;filename=${CI_PROJECT_NAME}-${CI_COMMIT_REF_SLUG}-codeception.xml"; fi'
- 'curl -X POST --data-urlencode "payload={\"text\": \"Testy projektu <https://gitlab.com/wpdesk/${CI_PROJECT_NAME}|${CI_PROJECT_NAME}> zostały wykonane. <https://wpdesk.gitlab.io/-/${CI_PROJECT_NAME}/-/jobs/${CI_JOB_ID}/artifacts/tests/codeception/tests/_output/records.html|Zapis testu>\", }" https://hooks.slack.com/services/${SLACK_AUTH}'
codeception test 1:
......
......@@ -67,6 +67,7 @@
- vendor/bin/codecept run --steps --xml --html -f --verbose
after_script:
- rm -r ${APACHE_DOCUMENT_ROOT}
- 'if [[ ${REPORTPORTAL_AUTHORIZATION} && ${REPORTPORTAL_PROJECT} ]]; then curl -X POST "http://195.201.225.204:8080/api/v1/${REPORTPORTAL_PROJECT}/launch/import" -H "accept: */*" -H "Content-Type: multipart/form-data" -H "${REPORTPORTAL_AUTHORIZATION}" -F "file=@tests/codeception/tests/_output/report.xml;type=text/xml;filename=${CI_PROJECT_NAME}-${CI_COMMIT_REF_SLUG}-codeception.xml"; fi'
codeception smoke test:
<<: *job-codeception-smoke-test
......@@ -83,4 +84,5 @@ codeception smoke test recorded manual:
- vendor/bin/codecept -c codeception-with-recorder.dist.yml run --steps --xml --html -d
after_script:
- rm -r ${APACHE_DOCUMENT_ROOT}
- 'if [[ ${REPORTPORTAL_AUTHORIZATION} && ${REPORTPORTAL_PROJECT} ]]; then curl -X POST "http://195.201.225.204:8080/api/v1/${REPORTPORTAL_PROJECT}/launch/import" -H "accept: */*" -H "Content-Type: multipart/form-data" -H "${REPORTPORTAL_AUTHORIZATION}" -F "file=@tests/codeception/tests/_output/report.xml;type=text/xml;filename=${CI_PROJECT_NAME}-${CI_COMMIT_REF_SLUG}-codeception.xml"; fi'
- 'curl -X POST --data-urlencode "payload={\"text\": \"Smoke testy projektu <https://gitlab.com/wpdesk/${CI_PROJECT_NAME}|${CI_PROJECT_NAME}> zostały wykonane. <https://wpdesk.gitlab.io/-/${CI_PROJECT_NAME}/-/jobs/${CI_JOB_ID}/artifacts/tests/codeception/tests/_output/records.html|Zapis testu>\", }" https://hooks.slack.com/services/${SLACK_AUTH}'
......@@ -71,6 +71,7 @@
- vendor/bin/codecept run --steps --xml --html -f --verbose
after_script:
- rm -r ${APACHE_DOCUMENT_ROOT}
- 'if [[ ${REPORTPORTAL_AUTHORIZATION} && ${REPORTPORTAL_PROJECT} ]]; then curl -X POST "http://195.201.225.204:8080/api/v1/${REPORTPORTAL_PROJECT}/launch/import" -H "accept: */*" -H "Content-Type: multipart/form-data" -H "${REPORTPORTAL_AUTHORIZATION}" -F "file=@tests/codeception/tests/_output/report.xml;type=text/xml;filename=${CI_PROJECT_NAME}-${CI_COMMIT_REF_SLUG}-codeception.xml"; fi'
codeception test:
<<: *job-codeception-test
......@@ -103,4 +104,5 @@ codeception test recorded manual:
- vendor/bin/codecept -c codeception-with-recorder.dist.yml run --steps --xml --html -f --verbose
after_script:
- rm -r ${APACHE_DOCUMENT_ROOT}
- 'if [[ ${REPORTPORTAL_AUTHORIZATION} && ${REPORTPORTAL_PROJECT} ]]; then curl -X POST "http://195.201.225.204:8080/api/v1/${REPORTPORTAL_PROJECT}/launch/import" -H "accept: */*" -H "Content-Type: multipart/form-data" -H "${REPORTPORTAL_AUTHORIZATION}" -F "file=@tests/codeception/tests/_output/report.xml;type=text/xml;filename=${CI_PROJECT_NAME}-${CI_COMMIT_REF_SLUG}-codeception.xml"; fi'
- 'curl -X POST --data-urlencode "payload={\"text\": \"Testy projektu <https://gitlab.com/wpdesk/${CI_PROJECT_NAME}|${CI_PROJECT_NAME}> zostały wykonane. <https://wpdesk.gitlab.io/-/${CI_PROJECT_NAME}/-/jobs/${CI_JOB_ID}/artifacts/tests/codeception/tests/_output/records.html|Zapis testu>\", }" https://hooks.slack.com/services/${SLACK_AUTH}'
......@@ -26,6 +26,8 @@
- echo "xdebug.mode=coverage" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
script:
- vendor/bin/phpunit -d memory_limit=-1 --configuration phpunit-integration.xml --coverage-text --colors=never --log-junit tmp_artifacts/report.xml
after_script:
- 'if [[ ${REPORTPORTAL_AUTHORIZATION} && ${REPORTPORTAL_PROJECT} ]]; then curl -X POST "http://195.201.225.204:8080/api/v1/${REPORTPORTAL_PROJECT}/launch/import" -H "accept: */*" -H "Content-Type: multipart/form-data" -H "${REPORTPORTAL_AUTHORIZATION}" -F "file=file=@tmp_artifacts/report.xml;type=text/xml;type=text/xml;filename=${CI_PROJECT_NAME}-${CI_COMMIT_REF_SLUG}-integration.xml"; fi'
only:
refs:
- master
......
......@@ -22,6 +22,8 @@
- echo "xdebug.mode=coverage" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
script:
- vendor/bin/phpunit -d memory_limit=-1 --configuration phpunit-unit.xml --coverage-text --colors=never --log-junit tmp_artifacts/report.xml
after_script:
- 'if [[ ${REPORTPORTAL_AUTHORIZATION} && ${REPORTPORTAL_PROJECT} ]]; then curl -X POST "http://195.201.225.204:8080/api/v1/${REPORTPORTAL_PROJECT}/launch/import" -H "accept: */*" -H "Content-Type: multipart/form-data" -H "${REPORTPORTAL_AUTHORIZATION}" -F "file=file=@tmp_artifacts/report.xml;type=text/xml;type=text/xml;filename=${CI_PROJECT_NAME}-${CI_COMMIT_REF_SLUG}-unit.xml"; fi'
only:
- master
- main
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment