Raporty junit w gitlab z dockerem

0

Uruchamiam testy automatyczne po stronie gitlaba, wszystko działa poza raportem JUnit, bo za kazdym razem jest ten sam ( nie jest on updatowany). Problem z tego co widze jest po stronie dockera, bo tam ten plik test-result.xml jest generowany i nie wiem jak sie tam dostac za pomoca gitlab scripta. Projekt testow automatycznych jest napisany w .net (c#)

Mój gitlab script:

stages:
 - build
 - test
docker-build-master:
  # Official docker image
  image: docker:latest
  stage: build
  services:
    - docker:dind
  before_script:
    - docker login -u "xxx" -p "yyy" docker.io
  script:
    - docker build ./AutomaticTests --pull -t "dockerImage" 
    - docker image tag dockerImage xxx/dockerImage:0.0.1
    - docker push "xxx/dockerImage:0.0.1"
  
test:
  image: docker:latest
  services:
    - docker:dind
  stage: test
  before_script:
    - docker login -u "xxx" -p "yyy" docker.io
  script: 
    - docker run "xxx/dockerImage:0.0.1"
  artifacts:
    when: always
    paths:
      - AutomaticTests/bin/Release/artifacts/test-result.xml
    reports:
      junit:
         - AutomaticTests/bin/Release/artifacts/test-result.xml

Dockerfile:

FROM mcr.microsoft.com/dotnet/core/sdk:2.1

COPY /publish  /AutomaticTests
WORKDIR /AutomaticTests

RUN apt-get update -y
RUN apt install unzip

RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
RUN dpkg -i google-chrome-stable_current_amd64.deb; apt-get -fy install

RUN curl https://chromedriver.storage.googleapis.com/84.0.4147.30/chromedriver_linux64.zip -o /usr/local/bin/chromedriver
RUN unzip -o /usr/local/bin/chromedriver -d /AutomaticTests
RUN chmod 777 /AutomaticTests


CMD dotnet vstest /Parallel AutomaticTests.dll --TestAdapterPath:. --logger:"nunit;LogFilePath=..\artifacts\test-result.xml;MethodFormat=Class;FailureBodyFormat=Verbose"


1

Hej @amek7

A co mówią logi?

1 użytkowników online, w tym zalogowanych: 0, gości: 1