/tester-web

An HTTP web server to hold competitive programming contests based on Tester testing backend.

Primary LanguagePascalGNU General Public License v2.0GPL-2.0

Tester Web logo

Table of Contents

What is Tester Web?

Tester Web is an HTTP web server to hold competitive programming contests. Tester Web is based on Tester testing backend. It is suitable to hold local contests for small amount of participants.

Advantages and disadvantages of Tester Web

The main advantages are:

  • Tester Web is very easy to install.
  • Simplicity in use (no many options, it's easy to add a problem or a contest to it).
  • Problems and contests can be accessed by many users. You can also choose access rights for each user.
  • It will work on any machine under Windows and GNU/Linux.
  • The dependency list is very small: the compilers (fpc, gcc, g++) must be installed. There are no other dependencies.

The disadvantages are:

  • Tester Web is not designed to hold big contests with hundreds of participants and doesn't support distributed testing on many machines.
  • No HTTPS support.
  • Sometimes Tester Web may be slow (will be optimized in the next versions).
  • Currenty there is no sandboxing. GNU/Linux users may use the patch for Linux kernel from Ejudge authors (info), which can be downloaded at ejudge.ru. This patch will work because Tester Web uses Ejudge libraries for testing.

Pre-requisites

Common

  • At first, you will need a computer 😃

  • 1 GB RAM (recommended 2 GB or more)

  • Free Pascal Compiler (for Pascal) and GNU GCC Compiler (for C/C++) installed. For Windows, paths to the compiler binaries must be set in PATH environment variable. Tester web will not launch without the compliers.

Windows

  • Recommended Windows versions are 7, 8, 8.1 or 10 (64-bit).

GNU/Linux

  • Tested on Ubuntu 16.04, 17.10 (64-bit), Debian 9, 10 (64-bit), but should work on other popular GNU/Linux distros.

  • Some checkers for problems may come only in EXE file, so you should install Wine to launch them.

Downloading latest release

Latest release of Tester Web can be found here.

Building from sources

Building pre-requisites

Common

Windows

  • Use the environment variable PATH to specify paths to Lazarus IDE directory and to GNU GCC's bin directory.

  • You will need Git Bash.

Linux

  • You will need Git.

  • Also you can build inside Docker and build a docker image with Tester Web. It is optional; building without Docker is also supported.

Building

To build Tester Web from sources, follow these steps:

$ git clone https://github.com/alex65536/tester-web
$ cd tester-web
$ git submodule init
$ git submodule update
$ cd build
$ ./build_all.sh

This will build the archive with Tester Web distribution. The archive will be located in <repo dir>/package.zip.

Alternative build inside Docker

You can also use Docker to build Tester Web. Here are the steps:

$ git clone https://github.com/alex65536/tester-web
$ cd tester-web
$ git submodule init
$ git submodule update
$ cd build
$ ./build_with_docker.sh

After the build succeeds, you will have package.zip, just like in the previous step.

Building Docker image

When you get package.zip after building Tester Web, you can also build a Docker image with it. To do this, use build/build_docker_image.sh.

Installing

Installing Tester Web is quite simple:

  1. Get the Tester Web distribution archive (download or build it) and unpack it anywhere you want.

  2. Run the server program located in <unpacked archive>/bin/tsweb (the ending of the filename depends on the platform you are using). The working dir must be the same as the directory where the server binary is located!

  3. Now log in as the server owner. Find the username and password in the configuration file stored in <home dir>/tsweb/data/config.ini. The keys defaults.password and defaults.userName in section [owner] of the config file store the default username and password. It's recommended to change the password after your first login.

  4. Now the server it set. Congratulations! 😃

Alternative way: using Docker

You can also use Tester Web inside a Docker container. There are no prebuilt images, you should build it yourself (see above).

Alternatively, you can use a Docker image by Ivan Udovin (link). This image is also smaller.

Usage

Coming soon ...

Thanks to

Ivan Udovin for providing the scripts to build a Docker image and to build inside Docker.

License

Tester Web is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Libraries used by Tester Web