Thanks to visit codestin.com
Credit goes to github.com

Skip to content

polcak/browser_extension_testing

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Run-time environment for browser extension testing

This repository contains the source code implemented as part of my master thesis at the University of Technology in Brno in 2023/2024.

Requirements

  • Docker must be installed on the host system, as well as Docker Compose. The Docker Engine must be running before building and deploying any of the containers. On Linux host machine, refrain from using Docker Desktop.
  • In case of a Windows host machine you also need to install X server software in order to display any browser windows during the execution. None of the tests are performed in headless because many of the performed tests are not supported in that mode. During the developement and testing, X410 was used. Please note on Windows you need to install Docker Desktop.
  • For Windows, Firefox also requires Pulseaudio for webaudio testing. Download Pulseaudio binaries and extract them anywhere you like. Then add the line load-module module-native-protocol-tcp listen=0.0.0.0 auth-anonymous=1 into the etc/pulse/default.pa file and start Pulseaudio from bin/pulseaudio.exe --use-pid-file=false --exit-idle-time=-1 -D.
  • For Linux, install Pulseaudio with the command apt-get install -y pulseaudio.
  • All other individual requirements are installed into the images while building them via Docker.

Contents

  • The integration_testing folder contains the code base needed to perform integration browser extension testing as described in detail in the thesis.
  • The system_testing folder similarly contains the code base for system testing.

How to build

Building either of the images from the Dockerfile might take several minutes based on the internet speed and host machine capacity. The Dockerfile takes advangate of multi-stage builds. The overlap of technologies is not huge so this is done in order to save space and time. After the first build, build data is cached through Docker, so subsequent builds take very litte time, unless the cache is cleared with the docker prune command.

How to build an image and run a container for integration testing

To build the image and run the container on Linux host, run the following command:

docker-compose run --rm --service-ports testing_integration_linux

In order to build an image and run a container for integration testing on Windows host (assuming Docker Desktop, Xserver and Pulseaudio are running), use this command:

docker-compose run --rm --service-ports testing_integration_windows

How to build an image and run a container for system testing

To build the image and run the container on Linux host, run the following command:

docker-compose run --rm --service-ports testing_system_linux

In order to build an image and run a container for system testing on Windows host (assuming Docker Engine is running), use this command:

docker-compose run --rm --service-ports testing_system_windows

If you run into privileges issues on Linux, try giving both start_testing.sh scripts execution privileges on the local machine.

sudo chmod +x ./integration_tests/start_testing.sh
sudo chmod +x ./system_tests/start_testing.sh

If you run into display issues on Linux, try adding Docker to xhost:

sudo xhost +local:docker

Results

The tests results are stored locally after each run.

  • For integration testing, see folder integration_tests/outputs for stored attributes generated by the server and the integration testing results.
  • For system testing, see folder system_tests/data to see the results of log and screenshot analysis.

Releases

No releases published

Packages

No packages published

Languages

  • Python 57.9%
  • JavaScript 34.3%
  • HTML 6.9%
  • Other 0.9%