XFCE Test is a setup of a Dockercontainer with Behave tests and an interactive bash helper xfce-test
.
The main usecases are:
The automatically created videos are on my youtube channel for now.
This containers are based on ubuntu with a build from git sources of all core Xfce components + some apps for testing. Other distributions and versions will be supported at a later stage!
There are some flavors available (see the dockerfiles/ directory) which mainly destinguish between the base container.
The special tags are described here:
Dockerfile-latest currently builds "MAIN_BRANCH=last_tag" which ends up with the current master but going back to the last valid tag set.
Dockerfile-last_release currently builds "MAIN_BRANCH=last_release" which tries to find the last tag starting with "xfce-M.m" which should be a special tag representing some compatibility between the main components
Dockerfile-devel really builds "master" so the latest source available
The tests are run automatically by travis.
:white_check_mark: Those test are usually errored or failed as we are building master of the xfce repositories. A more stable branch will follow.
This test is set-up as a docker container which is displaying it's X11 content on a Xephyr instance on your screen.
The first process to be started is LDTP As "toolkit-accessibility" is activated (see Dockerfile) LDTP provides an XMLRPC port to run automated tests.
On top of LDTP there is Behave running a series of tests.
You can also just start the container and "play around" in the newest XFCE environment...
xfce-test start
either "read" the xfce-test
script :) or at least assure docker and Xephyr to be on-board
For ubuntu those prerequisites are automatically installed by xfce-test
There is no direct need to install XFCE Test but for convenience you can install the script and the bash autocompletion functions with ./xfce-test install
If you did not clone all the source code of xfce-test already you can boot-strap easily with:
curl --fail --location -o /tmp/xfce-test https://github.com/schuellerf/xfce-test/raw/master/xfce-test && chmod u+x /tmp/xfce-test && /tmp/xfce-test install
Just start xfce-test
to get an interactive menu for possible options or call xfce-test --help
To see the container in action and play around with the "master" versions of XFCE applications just run xfce-test pull
to get the current container and xfce-test start
to start the container.
To inspect stuff inside the docker to help create more tests you might want to start sniff
which will help you identify the windows and buttons for LDTP.
You don't need to build the container you can just pull one to work with. If you really want to build the container locally you can just call
xfce-test build
When you want to have the sources from some timeago you can use the "DOWNLOAD_DATE" to help there
DOWNLOAD_DATE=2020-07-01 xfce-test build
If you have enough RAM, let's say more than 10G, you can build all components in parallel like so:
TAG=ubuntu_20.04-xfce-4.16 LOG=build-${TAG}.log PARALLEL_BUILDS=8 ./xfce-test build
This drastically reduces the container build time.
When you want to make screenshots for each behave test step just set the variable SCREENSHOTS
to ALWAYS
export SCREENSHOTS=ALWAYS
then run your behave tests
This is highly experimental!
If you are fine that some of your files on your computer might get deleted, you could run /behave_tests/translations.sh and see the resulting html file in /data/lang-screenshots
You can also use this container as test and compilation environment. The directory you are currently in, is automatically mounted to /data
in the container.
All the default build options which are used by the container are available as AUTOGEN_OPTIONS
environment variable in the container.
So when you started the container with xfce-test start
or xfce-test no-session
you can use those options for example by calling ./autogen.sh $AUTOGEN_OPTIONS
in the application.
As the applications of the container are built from source all developer packages and many developer tools are pre-installed. Also the sourcecode is available in the folder /git
within the container
An advanced example if you want to check a command in all docker images you have locally:
xfce-test list_local|xargs -n1 -I XYZ bash -c "TAG=XYZ xfce-test call apt search gtk-3-dev 2>&1 | egrep gtk-3\|working ; echo '----' "
This results in:
You are working with the container: latest
libgtk-3-dev/now 3.24.12-1ubuntu1 amd64 [installed,local]
----
You are working with the container: ubuntu_19.04
libgtk-3-dev/now 3.24.8-1ubuntu1 amd64 [installed,local]
----
You are working with the container: audio_test
libgtk-3-dev/now 3.24.8-1ubuntu1 amd64 [installed,local]
----
You are working with the container: ubuntu_18.04
libgtk-3-dev/now 3.22.30-1ubuntu4 amd64 [installed,local]
----