Closed KiteTesting closed 4 years ago
Hi, After cloning KITE, you can run our configuring scripts (depends on your OS):
This will set the env variables for KITE, including the path to the scripts (KITE/scripts/os/path/) for:
After this you can use the commands in the tutorials. We do recommend you running the configure script, but alternatively, you can use these followings:
mvn -DskiptTests clean install
java (-Dkite.firefox.profile="PATH_TO_FIREFOX_PROFILE") -cp "PATH_TO_KITE/KITE-Engine/target/kite-jar-with-dependencies.jar:PATH_TO_TEST/target:*" org.webrtc.Engine "PATH_TO_CONFIG_FILE"
*Firefox profile is optional, however, we do provide a default profile with h264 plugin pre-installed, this might be needed for some WebRTC application. **For classpath, on Linux and Mac, the jars are separated by ":", and on Windows by ";"
Cheers,
I did all the instructions you said and i copied the project , and now I want to run the KITE-Example test, but im stucked with this error :
Did you compile the KITE Engine before cd into KITE-Example-Test and call c
?
If you already call c
int KITE/, it compiles all of the modules including KITE-Example-Test, there's no need to compile the test module individually unless you're making changes to it.
After that you can just call r
to run your test.
When im trying to compile the entire KITE folder , it is showing this :
While in Windows, I didnt have these kind of errors.. Also, how to install and set the env variables for JAVA_HOME and MAVEN_HOME in Dockerfile?!
I'm trying to reproduce your errors, but can't. This is on a virtual machine with Ubuntu 18.04, maybe you're using a different variation of Linux?
Java and Maven version:
I cant compile the project :
Can you provide me steps how to resolve this and how to run the project. In windows i used to run the project by : r configs/js.example.config.json (javascript tutorial) , how can i do same thing here in linux now ?
I can't really help if I can't reproduce the issue here.
I followed your set of commands in both of your docker files and I got:
For me, on Ubuntu 18.04, these commands should be enough to compile KITE:
sudo apt-get install git openjdk-8-jdk maven
git clone https://github.com/webrtc/KITE KITE
cd KITE
cp scripts/linux/path/* ./ (if you don't want to add this to you $PATH)
./c
Which variation of LINUX are you using?
But probably it should be an alternative to run tests or to recognize the 'r' command :
FROM ubuntu as KiteBase
RUN apt update RUN apt install -y default-jre default-jdk openjdk-8-jdk maven git gcc build-essential nodejs npm
RUN apt-get install -y wget RUN wget https://dl.google.com/linux/linux_signing_key.pub
RUN git clone https://github.com/webrtc/KITE.git KITE RUN mvn --version RUN java --version
WORKDIR /KITE/scripts/linux RUN chmod +x *.sh ./setupLocalGrid.sh
COPY ./utils/google-chrome.list /etc/apt/sources.list.d/google-chrome.list
RUN apt install wget -y RUN wget https://dl.google.com/linux/linux_signing_key.pub RUN apt-key add linux_signing_key.pub RUN apt update RUN apt install google-chrome-stable -y
ENV KITE_HOME=/KITE ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64
RUN export JAVA_HOME=/opt/java/jdk-11.0.1 RUN export PATH=$PATH:$JAVA_HOME/bin ENV MAVEN_HOME /opt/maven RUN export MAVEN_HOME
FROM KiteBase
COPY ./scripts/linux/setupLocalGrid.sh . COPY ./scripts/linux/gridConfig.sh . COPY ./scripts/linux/path/c . COPY ./scripts/linux/path/r . COPY ./scripts/linux/path/t . COPY ./scripts/linux/path/a . COPY ./scripts/linux/path/kite_init .
There is of course, the r command is just a quick way to do it instead of:
java (-Dkite.firefox.profile="PATH_TO_FIREFOX_PROFILE") (-Dkite.chrome.extension="PATH_TO_CHROME_EXTENSION") -cp "PATH_TO_kite-jar-with-dependencies.jar:PATH_TO_YOUR_TEST_JAR" org.webrtc.kite.Engine PATH_TO_YOUR_CONFIG_FILE
@KiteTesting can you share your actual docker commands (docker build
etc.)
FWIW I was able to build the image with your Dockerfile with this modification (not strictly necessary but it's a good idea to pin distro versions):
FROM ubuntu:bionic-20191029 as KiteBase
and
KITE$ cat utils/google-chrome.list
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
I've been able at first to launch the grid, then to compile and run the project in nodes
But I keep getting those erros about webdriver, any help about that ?
This is the dockerfile im using :
FROM ubuntu:bionic-20191029 as KiteBase
RUN apt update RUN apt install -y default-jre default-jdk openjdk-8-jdk maven git gcc build-essential nodejs npm RUN apt-get install nano -y RUN apt-get install -y wget RUN wget https://dl.google.com/linux/linux_signing_key.pub
RUN git clone https://github.com/webrtc/KITE.git KITE RUN mvn --version RUN java --version WORKDIR /KITE/
WORKDIR /KITE/ RUN chmod +x *.sh ./configureLinux.sh
COPY ./utils/google-chrome.list /etc/apt/sources.list.d/google-chrome.list
RUN wget https://dl.google.com/linux/linux_signing_key.pub RUN apt-key add linux_signing_key.pub RUN apt update RUN apt install google-chrome-stable -y
ENV KITE_HOME=/KITE RUN export KITE_HOME ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
RUN export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/bin
ENV MAVEN_HOME=/opt/maven RUN export MAVEN_HOME
FROM KiteBase COPY ./KITE-Engine . COPY ./KITE-Framework . COPY ./KITE-Engine . COPY ./scripts/linux/setupLocalGrid.sh . COPY ./scripts/linux/gridConfig.sh . COPY ./scripts/linux/path/c . COPY ./scripts/linux/path/r . COPY ./scripts/linux/path/t . COPY ./scripts/linux/path/a . COPY ./scripts/linux/path/kite_init . ADD pom.xml /KITE/pom.xml
WORKDIR KITE/KITE-MessengerLogin-Test . COPY ./KITE-MessengerLogin-Test .
Hi, I'll try to reproduce that error with Js test next week and get back to you. Normally if your grid has chrome on linux, there should not be this error.
However we are not currently using docker, so I will test it only with ubuntu 18.
Now, with this version of dockerfile, im getting this error:
FROM ubuntu as KiteBase
RUN apt update RUN apt install -y default-jre default-jdk openjdk-8-jdk maven git gcc build-essential nodejs npm RUN apt-get install nano -y RUN apt-get install -y wget dpkg unzip
RUN git clone https://github.com/webrtc/KITE.git KITE RUN mvn --version RUN java --version
WORKDIR /KITE/
RUN chmod +x *.sh ./configureLinux.sh
ENV KITE_HOME=/KITE RUN export KITE_HOME ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
RUN export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/bin
ENV MAVEN_HOME=/usr/share/maven RUN export MAVEN_HOME
FROM KiteBase COPY ./KITE-Engine . COPY ./KITE-Framework . COPY ./KITE-Engine . COPY ./scripts/linux/setupLocalGrid.sh . COPY ./scripts/linux/gridConfig.sh . COPY ./scripts/linux/path/c . COPY ./scripts/linux/path/r . COPY ./scripts/linux/path/t . COPY ./scripts/linux/path/a . COPY ./scripts/linux/path/kite_init . COPY ./scripts/linux/createFolderLocalGrid.sh . COPY ./scripts/linux/installChrome.sh . COPY ./scripts/linux/installFirefox.sh . COPY ./scripts/linux/installSelenium.sh . COPY ./scripts/linux/installMaven.sh . COPY ./scripts/linux/interactiveInstallation.sh .
ADD pom.xml /KITE/pom.xml
WORKDIR KITE/KITE-MessengerLogin-Test . COPY ./KITE-MessengerLogin-Test .
Check the errors here https://prnt.sc/qg0j6n https://prnt.sc/qg0jfj https://prnt.sc/qg0kd9
I know the errors are about the drivers versions, but could you help us a little here ?
Can you tell me how you setup your grid? and the browser configuration that you are calling with KITE.
FROM ubuntu as KiteBase
RUN apt update RUN apt install -y default-jre default-jdk openjdk-8-jdk maven git gcc build-essential RUN apt-get install nano -y RUN apt-get install -y sudo wget dpkg unzip xvfb
RUN git clone https://github.com/webrtc/KITE.git KITE RUN mvn --version RUN java --version
WORKDIR /KITE/
RUN chmod +x *.sh ./configureLinux.sh
ENV KITE_HOME=/KITE RUN export KITE_HOME ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
RUN export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/bin
ENV MAVEN_HOME=/usr/share/maven RUN export MAVEN_HOME
FROM KiteBase COPY ./KITE-Engine . COPY ./KITE-Framework . COPY ./KITE-Engine . COPY ./scripts/linux/setupLocalGrid.sh . COPY ./scripts/linux/gridConfig.sh . COPY ./scripts/linux/path/c . COPY ./scripts/linux/path/r . COPY ./scripts/linux/path/t . COPY ./scripts/linux/path/a . COPY ./scripts/linux/path/kite_init . COPY ./scripts/linux/createFolderLocalGrid.sh . COPY ./scripts/linux/installChrome.sh . COPY ./scripts/linux/installFirefox.sh . COPY ./scripts/linux/installSelenium.sh . COPY ./scripts/linux/installMaven.sh . COPY ./scripts/linux/installDrivers.sh . COPY ./scripts/linux/interactiveInstallation.sh .
ADD pom.xml /KITE/pom.xml
WORKDIR KITE/KITE-Login-Test . COPY ./KITE-Login-Test .
From this dockerfile i launch the grid by this command RUN chmod +x *.sh ./configureLinux.sh .
the script installChrome.sh::
set +v . ./gridConfig.sh google-chrome-stable -version >chrome.txt chromeFile="chrome.txt" chrome=$(cat "$chromeFile")
if [[ $chrome == $CHROME_VERSION ]]; then echo Chrome version $CHROME_VERSION was found else echo Chrome version $CHROME_VERSION was not found, installing it.
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb dpkg -i google-chrome-stable_current_amd64.deb apt-get fonts-liberation apt --fix-broken install rm -f google-chrome-stable_current_amd64.deb fi
rm -f chrome.txt
exit
the script setupLocalGrid.sh :
set +v . ./gridConfig.sh
echo $KITE_HOME cd $KITE_HOME/scripts/linux
function startGrid() { cd $KITE_HOME/localGrid if [ "$DESKTOP_ENVIRONMENT" = "TRUE" ] then x-terminal-emulator -e ./startGrid.sh & else ./startGrid.sh & fi }
if [[ "$DESKTOP_ENVIRONMENT" = "TRUE" ]] then apt-get -y upgrade -f gnome-terminal fi
./createFolderLocalGrid.sh
if [[ "$INSTALL_BROWSERS" = "TRUE" ]] then ./installChrome.sh ./installFirefox.sh else echo "Skipping Chrome and Firefox installation" fi
./installDrivers.sh ./installSelenium.sh
# [Nn]* )
# echo " "
# ;;
#* ) echo "Please answer yes or no.";;
echo "Setup completed."
gridConfig.sh script:
#
#
#
export INSTALL_BROWSERS=TRUE
export USE_CAPABILITY_MATCHER=FALSE
export DESKTOP_ENVIRONMENT=FALSE
export LOCALHOST=FALSE
export GECKO_VERSION=v0.26.0 export CHROMEDRIVER_VERSION=79.0.3945.36
export SELENIUM_VERSION_SHORT=3.141 export SELENIUM_VERSION=3.141.59
export FIREFOX_VERSION=70 export CHROME_VERSION=79
export KITE_EXTRAS_VERSION=0.1.4 export GRID_UTILS_VERSION=0.0.1
And on the grid's console UI (http://HUB_IP:HUB_PORT/grid/console), do you have all the browsers listed, with the correct config that you're calling ? Something like this: (never mind the gateway and binary path)
and same for firefox
Im testing only with Chrome and this is what i get :
Looks like you do have a node registered with chrome 79. Does you config file look like this, for the grid and clients?
Can the machine/container on which you're running KITE connect to http://172.17.0.2:4444/wd/hub
Please provide the exact info that I require and make sure that your comments are easy to read. It seems that every time you are providing a lot of irrelevant stuff which make it difficult to understand your process and to resolve your issue.
issue is solved
@KiteTesting what was your eventual Dockerfile? I have built one myself, but I can't seem to get Chrome to run headless.
Im about to start writing KITE tests in Linux. This is the Dockerfile i created:
FROM ubuntu as KiteBase
RUN apt update RUN apt install -y default-jre default-jdk openjdk-8-jdk maven git gcc build-essential RUN git clone https://github.com/webrtc/KITE.git KITE
WORKDIR /KITE/scripts/linux
RUN chmod +x *.sh ./setupLocalGrid.sh
COPY ./utils/google-chrome.list /etc/apt/sources.list.d/google-chrome.list
RUN apt install wget -y RUN wget https://dl.google.com/linux/linux_signing_key.pub RUN apt-key add linux_signing_key.pub RUN apt update RUN apt install google-chrome-stable -y RUN apt install npm nodejs -y RUN nodejs -v
ENV KITE_HOME=/KITE ENV MAVEN_HOME =/usr/share/maven ENV JAVA_HOME =/usr/share/Java
FROM KiteBase
COPY ./scripts/linux/setupLocalGrid.sh .
COPY ./KITE-Example-Test .
I am able to create the localgrid in linux like this:
Im able to go into the project folder like in the picture below :
Now I'm asking if i should at first compile the project and then run it ?! If yes, how can I do the compiling and running the project, because the commands provided in this tutorial are not working :
Thanks!