Skip to content

Commit

Permalink
Updated tkltest-ui docker file to python and chrome/chromedriver vers…
Browse files Browse the repository at this point in the history
…ions;

enabled CI docker tests for tkltest-ui

Signed-off-by: Saurabh Sinha <[email protected]>
  • Loading branch information
sinha108 committed Sep 30, 2023
1 parent ab6e50b commit d11bee4
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 24 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/tkltest_ui_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@ jobs:
run: |
source venv/bin/activate
bats --print-output-on-failure test/ui/test_cli_addressbook.bats
# - name: Run tkltest-ui help/config tests using docker-compose
# run: |
# bats --print-output-on-failure test/ui/test_cli_docker.bats
# - name: Run tkltest-ui generate/execute tests using docker-compose - petclinic
# run: |
# bats test/ui/test_cli_docker_petclinic.bats
# - name: Run tkltest-ui generate/execute tests using docker-compose - addressbook
# run: |
# bats --print-output-on-failure test/ui/test_cli_docker_addressbook.bats
- name: Run tkltest-ui help/config tests using docker-compose
run: |
bats --print-output-on-failure test/ui/test_cli_docker.bats
- name: Run tkltest-ui generate/execute tests using docker-compose - petclinic
run: |
bats test/ui/test_cli_docker_petclinic.bats
- name: Run tkltest-ui generate/execute tests using docker-compose - addressbook
run: |
bats --print-output-on-failure test/ui/test_cli_docker_addressbook.bats
2 changes: 1 addition & 1 deletion doc/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ TackleTest-Unit performs CTD modeling and test-plan generation using the [NIST A
### Prerequisites for TackleTest-UI
1. Install Python 3.9
1. Install Python 3.9 (tested on Python 3.9, 3.10, 3.11)
2. Install JDK 11
Expand Down
44 changes: 30 additions & 14 deletions setup/tkltestui.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,37 @@
FROM maven:3-openjdk-11
FROM maven:3-eclipse-temurin-11

# copy from python 3.9 image
#COPY --from=python:3.9-slim / /

# install ant
RUN mkdir -p /usr/share/man/man1
RUN apt-get update && apt-get install -y wget python3.9 python3-pip
RUN apt-get install -y gnupg2 libgtk2.0-0 chromium-driver

# install google chrome and chromedriver
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list \
&& apt-get update -qqy \
&& apt-get -qqy install google-chrome-stable \
&& rm /etc/apt/sources.list.d/google-chrome.list \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/* \
&& sed -i 's/"$HERE\/chrome"/"$HERE\/chrome" --no-sandbox/g' /opt/google/chrome/google-chrome
# install python3.9
RUN apt-get update && apt-get install -y wget unzip gnupg2 libgtk2.0-0 python3.11 python3-pip
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 2 \
&& update-alternatives --config python3

# install google chrome
#RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
# && echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list \
# && apt-get update -qqy \
# && apt-get -qqy install google-chrome-stable \
# && rm /etc/apt/sources.list.d/google-chrome.list \
# && rm -rf /var/lib/apt/lists/* /var/cache/apt/* \
# && sed -i 's/"$HERE\/chrome"/"$HERE\/chrome" --no-sandbox/g' /opt/google/chrome/google-chrome

# get chrome version
ARG CHROME_RELEASE=117
RUN curl https://googlechromelabs.github.io/chrome-for-testing/LATEST_RELEASE_$CHROME_RELEASE > /root/chrome_version

# install chrome
RUN CHROME_VERSION=$(cat /root/chrome_version) \
&& wget https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}-1_amd64.deb \
&& apt-get --fix-broken install -y ./google-chrome-stable_${CHROME_VERSION}-1_amd64.deb \
&& sed -i 's/"$HERE\/chrome"/"$HERE\/chrome" --no-sandbox/g' /opt/google/chrome/google-chrome

# install chromedriver
RUN CHROME_VERSION=$(cat /root/chrome_version) \
&& wget https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/${CHROME_VERSION}/linux64/chromedriver-linux64.zip \
&& unzip chromedriver-linux64.zip && mv chromedriver-linux64/chromedriver /usr/bin/chromedriver \
&& chmod +x /usr/bin/chromedriver

# install java lib dependencies
WORKDIR /app/tackle-test-cli
Expand Down

0 comments on commit d11bee4

Please sign in to comment.