Code Monkey home page Code Monkey logo

testrail-docker's Introduction

TestRail - let's put it in docker containers

What's in this repository?

This repo contains Dockerfiles and compose files to spawn TestRail in docker containers. The compose files rely on public available TestRail images available here.

Requirements

  • Install docker + docker-compose (on Linux, using pip is recommended)
  • Some basic understanding of docker (e.g knowing what containers, images, detached mode, ... are)
    → Official "Get Started" available here
  • Optional: If you're using the quickstart.sh script, also install sudo and ip (usually pre-installed on most systems)

Quick start with script

  • Run quickstart.sh
  • Type in two passwords -- one for the "normal" database user and one for root
  • Wait a few moments -- TestRail will be downloaded and set up

TestRail should be accessible via: http://localhost:8000

Finish the installation through the web UI (use the values printed by installer at the end)

Running Testrail using docker-compose

The compose file is configured via environment variables -- it's suggested to use a .env file. More about such an .env file is available here.

  • Create a .env file with at least the mandatory variables for:
    • DB_USER
    • DB_NAME
    • DB_PWD
    • DB_ROOT_PWD
  • Run docker-compose up (it will take a few minutes the very first time) You're done!

TestRail should be accessible via: http://localhost:8000

Re-enter the values you specified in the .env file when the TestRail installer asks for the database settings. To remove the instance, press Ctrl+C and then run docker-compose down.


Running TestRail with an external DB

If you'd like to just run TestRail and use a DB hosted on another server, in the cloud, starting TestRail is simple. In this case, only docker is needed (not 'docker-compose', as mentioned above).

docker run -d --name testrail -p 8000:80 -v $PWD/_opt:/opt/testrail -v $PWD/_config:/var/www/testrail/config testrail/apache:latest

How to use the compose files

The .env file

It's suggested to create a local .env file, to specify user or machine specific variables (more see here). Syntax is simple: e.g. 'HTTP_PORT=8000'

Environment variables can also be set directly in the shell with the same syntax and then using docker-compose.

Optional variables are:

Pre-populated databases and TestRails config.php

Via the DB_URL variable, it's also possible to provide a SQL-dump to be downloaded by the container, so TestRail is already pre-configured. For proper functionality, the config.php file needs to be provided. Simply copy it into the _config folder. Ensure that the values in the config.php file match the database settings for user and password, which are specified in the compose file for the db.

The Compose Files

General usage:

docker-compose up
docker-compose down

up starts the container; down stops everything. The docker-compose CLI reference can be found here.

Additional useful options:

  • -v (remove named volumes) This is important to remove temporary volumes after shutdown and is recommended to be used. If the volumes should not be purged, don't use this parameter. However, be aware that this might still cause some side effects.
  • -f (file) Can be used to specify a different compose file (by default docker-compose.yml is used)
  • -p (project) Has to be used if multiple TestRail instances should be started.
    Details Otherwise docker-compose with interact with an already running container. The name of the folder docker-compose is started in (in this case 'internal-docker') is used as a project name and is prepended to all spawned containers.

Recommendation: Use docker-compose down -v, as it removes named and anonymous volumes!


General remarks on the compose files

All compose files rely on additional volumes

  • testrail_root contains the installation and gets mounted to /var/www/testrail
  • testrail_opt contains uploaded files etc. and gets mounted to /opt/testrail
  • testrail_db contains the database and gets mounted to /var/lib/mysql.
  • testrail_cassandra contains the Cassandra database and gets mounted to /var/lib/cassandra.
  • testrail_config contains the config.php file, which configures TestRail and is mounted to /var/www/testrail/config

Containers are connected though a testrail bridged network. Start-order is important -- php needs to be first, followed by webserver and DB.

testrail-docker's People

Contributors

artur-rupp avatar cbreit avatar damianszymanski avatar gneb avatar hlivsetar avatar konradzuwala avatar mrivington-tr-galt avatar piotrmilcarz avatar romaintt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

testrail-docker's Issues

[8.0.4.7036]: Undefined property: stdClass::$is_invalidated

Using the latest (8.0.4.7036) binaries you just published results into the following error message: Undefined property: stdClass::$is_invalidated
Note: I get this error only in the title of the browser tab, that page itself is classic blue. Nothing more, nothing less. Also I don't have any more information. Couldn't find anything more related to that.

This is the whole logs from the apache container:

##############
Waiting for background task file
Starting background task
##############
Class "SpecialCharsEnum" not found
[Thu Jun 20 17:27:39.830844 2024] [mpm_prefork:notice] [pid 15] AH00163: Apache/2.4.59 (Debian) PHP/8.1.29 configured -- resuming normal operations
[Thu Jun 20 17:27:39.830872 2024] [core:notice] [pid 15] AH00094: Command line: 'apache2 -D FOREGROUND'
10.244.0.1 - - [20/Jun/2024:17:27:42 +0200] "GET /index.php?/dashboard HTTP/1.1" 500 1948 "https://testrail.local/index.php?/auth/login/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:27:43 +0200] "GET /index.php?/dashboard HTTP/1.1" 500 1948 "https://testrail.local/index.php?/auth/login/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:27:43 +0200] "GET /index.php?/dashboard HTTP/1.1" 500 1948 "https://testrail.local/index.php?/auth/login/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:27:44 +0200] "GET /index.php?/dashboard HTTP/1.1" 500 1948 "https://testrail.local/index.php?/auth/login/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:27:48 +0200] "GET / HTTP/1.1" 500 1948 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:27:55 +0200] "GET / HTTP/1.1" 500 1948 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:27:55 +0200] "GET /css/font.css HTTP/1.1" 200 832 "https://testrail.local/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:27:55 +0200] "GET /css/error-modern-combined.css?7036 HTTP/1.1" 200 18749 "https://testrail.local/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:27:55 +0200] "GET /css/brand/style.css HTTP/1.1" 200 1192 "https://testrail.local/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:27:55 +0200] "GET /css/input-autocomplete.css HTTP/1.1" 200 468 "https://testrail.local/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:27:55 +0200] "GET /css/drilldown.css HTTP/1.1" 200 1300 "https://testrail.local/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:27:55 +0200] "GET /css/brand/brand-modern.css HTTP/1.1" 200 543 "https://testrail.local/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:27:55 +0200] "GET /css/jquery.data-tables.min.css HTTP/1.1" 200 2482 "https://testrail.local/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:27:55 +0200] "GET /css/assembla.css HTTP/1.1" 200 2915 "https://testrail.local/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:27:56 +0200] "GET / HTTP/1.1" 500 1948 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:27:56 +0200] "GET /css/banner-enterprise-modern.css HTTP/1.1" 200 1639 "https://testrail.local/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:27:56 +0200] "GET /css/font.css HTTP/1.1" 200 832 "https://testrail.local/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:27:56 +0200] "GET /css/drilldown.css HTTP/1.1" 200 1300 "https://testrail.local/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:27:56 +0200] "GET /css/brand/brand-modern.css HTTP/1.1" 200 543 "https://testrail.local/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:27:56 +0200] "GET /css/brand/style.css HTTP/1.1" 200 1192 "https://testrail.local/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:27:56 +0200] "GET /css/assembla.css HTTP/1.1" 200 2915 "https://testrail.local/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:27:56 +0200] "GET /css/banner-enterprise-modern.css HTTP/1.1" 200 1639 "https://testrail.local/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:27:56 +0200] "GET /css/input-autocomplete.css HTTP/1.1" 200 468 "https://testrail.local/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:27:56 +0200] "GET /css/application.datasets.css HTTP/1.1" 200 3879 "https://testrail.local/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:27:56 +0200] "GET /css/error-modern-combined.css?7036 HTTP/1.1" 200 18749 "https://testrail.local/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:27:56 +0200] "GET /images/theme-modern/layout/structureBG.svg HTTP/1.1" 200 333 "https://testrail.local/css/error-modern-combined.css?7036" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:27:56 +0200] "GET /css/application.autocomplete.css HTTP/1.1" 200 670 "https://testrail.local/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:27:56 +0200] "GET /css/fixed-columns.data-tables.min.css HTTP/1.1" 200 524 "https://testrail.local/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:27:56 +0200] "GET /css/application.datasets.css HTTP/1.1" 200 3879 "https://testrail.local/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:27:56 +0200] "GET /css/application.autocomplete.css HTTP/1.1" 200 670 "https://testrail.local/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:27:57 +0200] "GET /css/jquery.data-tables.min.css HTTP/1.1" 200 2482 "https://testrail.local/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:27:57 +0200] "GET /css/fixed-columns.data-tables.min.css HTTP/1.1" 200 524 "https://testrail.local/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
::1 - - [20/Jun/2024:17:28:00 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.59 (Debian) PHP/8.1.29 (internal dummy connection)"
10.244.0.1 - - [20/Jun/2024:17:28:00 +0200] "GET / HTTP/1.1" 500 1948 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:28:01 +0200] "GET /css/font.css HTTP/1.1" 200 832 "https://testrail.local/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:28:01 +0200] "GET /css/drilldown.css HTTP/1.1" 200 1300 "https://testrail.local/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:28:01 +0200] "GET /css/brand/style.css HTTP/1.1" 200 1192 "https://testrail.local/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:28:01 +0200] "GET /css/brand/brand-modern.css HTTP/1.1" 200 543 "https://testrail.local/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:28:01 +0200] "GET /css/banner-enterprise-modern.css HTTP/1.1" 200 1639 "https://testrail.local/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:28:01 +0200] "GET /css/assembla.css HTTP/1.1" 200 2915 "https://testrail.local/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:28:01 +0200] "GET /css/application.autocomplete.css HTTP/1.1" 200 670 "https://testrail.local/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:28:01 +0200] "GET /css/input-autocomplete.css HTTP/1.1" 200 468 "https://testrail.local/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:28:01 +0200] "GET /css/fixed-columns.data-tables.min.css HTTP/1.1" 200 524 "https://testrail.local/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:28:01 +0200] "GET /css/jquery.data-tables.min.css HTTP/1.1" 200 2482 "https://testrail.local/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:28:01 +0200] "GET /css/error-modern-combined.css?7036 HTTP/1.1" 200 18749 "https://testrail.local/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:28:01 +0200] "GET /css/application.datasets.css HTTP/1.1" 200 3879 "https://testrail.local/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
10.244.0.1 - - [20/Jun/2024:17:28:01 +0200] "GET /images/theme-modern/layout/structureBG.svg HTTP/1.1" 200 333 "https://testrail.local/css/error-modern-combined.css?7036" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
::1 - - [20/Jun/2024:17:28:01 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.59 (Debian) PHP/8.1.29 (internal dummy connection)"
::1 - - [20/Jun/2024:17:28:06 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.59 (Debian) PHP/8.1.29 (internal dummy connection)"
::1 - - [20/Jun/2024:17:28:07 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.59 (Debian) PHP/8.1.29 (internal dummy connection)"
::1 - - [20/Jun/2024:17:28:08 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.59 (Debian) PHP/8.1.29 (internal dummy connection)"
::1 - - [20/Jun/2024:17:28:09 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.59 (Debian) PHP/8.1.29 (internal dummy connection)"
::1 - - [20/Jun/2024:17:28:10 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.59 (Debian) PHP/8.1.29 (internal dummy connection)"
::1 - - [20/Jun/2024:17:28:11 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.59 (Debian) PHP/8.1.29 (internal dummy connection)"
::1 - - [20/Jun/2024:17:28:12 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.59 (Debian) PHP/8.1.29 (internal dummy connection)"
::1 - - [20/Jun/2024:17:28:13 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.59 (Debian) PHP/8.1.29 (internal dummy connection)"
Class "SpecialCharsEnum" not found
Class "SpecialCharsEnum" not found
Class "SpecialCharsEnum" not found

Image 6.3.1 on dockerhub delivers 6.3.0.1120

Hi,

the testrail-apache docker image on https://hub.docker.com/r/testrail/apache/tags is containing the wrong version

# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
testrail/apache     6.3.1               2f3921e47b48        7 days ago          745MB
testrail/apache     6.3.1.1004          2f3921e47b48        7 days ago          745MB

And in the Admin Interface its 6.3.0.1120 after install.

See:

https://hub.docker.com/layers/testrail/apache/6.3.1.1004/images/sha256-2d3ed4b2cddc3bc35d2b0d902f09da5366cc15850b07e16582b548a8168ee905?context=explore

How do I access the DB remotely?

I cannot access the testrail DB inside the container remotely. Keep getting sock errors or can't connect to SQL DB Error 61.

abhijit.sipani@ASipani ~ % mysql -u root -h 10.110.0.25 -p -P 33060
Enter password: 
ERROR 2003 (HY000): Can't connect to MySQL server on '10.110.0.25:33060' (61)
abhijit.sipani@ASipani ~ % mysql -u root -h 10.110.0.25 -p
Enter password: 
ERROR 2003 (HY000): Can't connect to MySQL server on '10.110.0.25:3306' (61)

Local access fails as well

[ec2-user@ip-10-110-0-25 testrail-docker-master]$ mysql -u root -p 
Enter password: 
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

Cassandra default user and password?

Cannot see any mention about default values for Cassandra connection in README

image

My .env look like this:

DB_USER=testrail
DB_NAME=testrail
DB_PWD=testrail
DB_ROOT_PWD=12345678

Cassandra version is always set to '-' instead of '1'

Environment

  • Kubernetes:
Client Version: v1.28.5+k3s1
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.28.5+k3s1
  • Helm
version.BuildInfo{Version:"v3.13.1", GitCommit:"3547a4b5bf5edb5478ce352e18858d8a552a4110", GitTreeState:"clean", GoVersion:"go1.20.8"}
  • Testrails:
testrail/apache:7.0.2.1016 -> testrail/apache:7.5.1.7010
  • Cassandra/MySQL:
testrail/mysql:default && testrail/cassandra:default

Whats the Issue

When I try to update from Testrail v7.0.1.1013 to v7.5.1.7010 I get stuck in a loop with the updater.

It initially loads stating that my database version (MySQL) is currently set to 20210320140000 and it wants to update it to 20220425000001, and it states that my Cassandra version is - and the new version is 1. It will run through the updater and tell me that it was a successful update (Only updating the database version (MySQL)) and that i can go to testrail to login, but when i try to transition back to the login screen it pushes me back to the updater stating that Cassandra is still set to - instead of 1
Screenshot 2024-01-30 at 3 36 45 PM

Workarounds

I can exec into the pod that is running the mysql instance and insert the following into the settings table:

insert into settings (name, value) values ('cassandra_version', 1);

After inserting this into the settings table, if i transition back to the Testrail UI and reload the page it'll work like a charm.

Closing

Is there something I am doing wrong here that is causing this update process to act this way? I haven't seen any of this behavior documented in the documentation and I don't think I should have to manually update the database to get the application to work properly. Any help would be appreciated!

Docker: Could not connect to the specified Cassandra keyspace.

I am running Docker 20.10.12 on Ubuntu 22.04.1 LTS

Steps to reproduce:

  1. git clone https://github.com/gurock/testrail-docker
  2. cd testrail-docker && ./quickstart.sh
  3. Fill out the options. I chose: Enter, c, l, Password123, Password123
  4. Note the information read out, everything looks good
  5. Go to the web UI, agree to the license and follow the installer
  6. Fill out MySQL settings, this works fine
  7. Fill out Cassandra settings:

image

image

The installer mentions creating a new empty keyspace but it's not obvious how to do this for Docker.

Thank you!

Failed to retrieve cases

I'm using the APIs to retrieve the data from testrail, and it gives this error:
Failed to retrieve cases: {"error":"API Rate Limit Exceeded - 500 per minute maximum allowed. Retry after 1 seconds."}

and then after while, it gives wrong data

Reports fail to load when

Since upgrading to version v8.0.1 (Default 1029) , when we try and view reports , they no longer load.

This was fine in version 7.5.3.

If we try and view a report - example url : https://mydomain.example/index.php?/reports/view/1 .

The wheel of death keeps on spinning.

I loaded up dev tools to try and debug this and we get the following error

Refused to frame 'https://mydomain.example/index.php?/reports/render/1' because it violates the following Content Security Policy directive: "frame-src https://app.pendo.io https://*.testrail-staging.com https://*.testrail.com https://*.testrail.io http://*.eu-central-1.compute.amazonaws.com https://*.testrail.net".

This looks like a piece of code that possibly isn't meant to be there ?

Looks to be cause by this piece in the header within index.php .

In the process of trying to manually remove this to see if it fixes the issue, although needs a proper solution.
Our domain does not fall into these unsafe ones below . Happy to try an alternative fix if there is one but appears to be a bug as it was working in previous versions.

<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline' 'unsafe-eval' https://static.testrail-staging.com https://static.testrail.com https://static.testrail.io https://cdn.pendo.io https://data.pendo.io https://app.pendo.io https://pendo-static-5699730914541568.storage.googleapis.com https://cdn.embedly.com ; style-src 'self' 'unsafe-inline' https://static.testrail-staging.com https://static.testrail.com https://static.testrail.io https://pendo-static-5699730914541568.storage.googleapis.com ; style-src-elem 'self' 'unsafe-inline' https://static.testrail-staging.com https://static.testrail.com https://static.testrail.io https://pendo-static-5699730914541568.storage.googleapis.com ; style-src-attr 'self' 'unsafe-inline'  ; font-src 'self' https://fonts.gstatic.com https://static.testrail-staging.com https://static.testrail.com https://static.testrail.io ; connect-src 'self' https://app.pendo.io https://data.pendo.io https://pendo-static-5699730914541568.storage.googleapis.com ; media-src *  ; object-src 'none'  ; prefetch-src 'self'  ; worker-src 'none'  ; base-uri 'self'  ; frame-src  https://app.pendo.io https://*.testrail-staging.com https://*.testrail.com https://*.testrail.io http://*.eu-central-1.compute.amazonaws.com https://*.testrail.net ; child-src  https://app.pendo.io ;">

Thanks,

Error generating PDF reports

The public available image at hub.docker.com/testrail/apache:latest has some additional config that isn't present in the testrail-apache dockerFile in this repo.

When building the image from the dockerFile, the task.php fails to generate PDF reports with this error:

/var/www/testrail/app/helpers/../../bin/phantomjs_x86_64: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory

This is fixed by adding the below to the dockerFile:

ENV OPENSSL_CONF="/etc/ssl/"

and installing libfontconfig1

RUN \ apt-get update && \ apt-get install -y --no-install-recommends curl zip unzip wget iputils-ping mariadb-client && \ apt-get install -y --no-install-recommends zlib1g-dev libcurl4-gnutls-dev libldap2-dev zlib1g-dev libxml2-dev libfontconfig1 && \ apt-get clean && \ rm -rf /var/lib/apt/lists/*

It then works as expected.

Both changes are already in the prebuilt image on dockerhub:

https://hub.docker.com/layers/testrail/apache/latest/images/sha256-58c49e6ed5ce94d15f2f351ca0e8794ff37cf7031647a8ad167836b60d0a0dfe

Failed loading /opt/ioncube/ioncube_loader_lin_.so

when i use testrail/apache docker image to build a container this error pop-out : Failed loading /opt/ioncube/ioncube_loader_lin_.so: /opt/ioncube/ioncube_loader_lin_.so: cannot open shared object file: No such file or directory

can any one help please ?

migration failed

I have migration's error when I upgrade testrail from 6.6 to 7.5

== 20220111140001 AddPrivateKeyToSsoSettingsTable: migrating PDOException: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'saml_encryption_private_key' in /opt/testrail/vendors/phinx/Db/Adapter/PdoAdapter.php:217 Stack trace: #0 /opt/testrail/vendors/phinx/Db/Adapter/PdoAdapter.php(217): PDO->exec() #1 /opt/testrail/vendors/phinx/Db/Util/AlterInstructions.php(112): Phinx\Db\Adapter\PdoAdapter->execute() #2 /opt/testrail/vendors/phinx/Db/Adapter/PdoAdapter.php(643): Phinx\Db\Util\AlterInstructions->execute() #3 /opt/testrail/vendors/phinx/Db/Adapter/PdoAdapter.php(1018): Phinx\Db\Adapter\PdoAdapter->executeAlterSteps() #4 /opt/testrail/vendors/phinx/Db/Adapter/AdapterWrapper.php(484): Phinx\Db\Adapter\PdoAdapter->executeActions() #5 /opt/testrail/vendors/phinx/Db/Adapter/TimedOutputAdapter.php(434): Phinx\Db\Adapter\AdapterWrapper->executeActions() #6 /opt/testrail/vendors/phinx/Db/Plan/Plan.php(153): Phinx\Db\Adapter\TimedOutputAdapter->executeActions() #7 /opt/testrail/vendors/phinx/Db/Table.php(722): Phinx\Db\Plan\Plan->execute() #8 /opt/testrail/vendors/phinx/Db/Table.php(629): Phinx\Db\Table->executeActions() #9 /opt/testrail/vendors/phinx/Db/Table.php(688): Phinx\Db\Table->update() #10 /opt/testrail/db/migrations/20220111140001_add_private_key_to_sso_settings_table.php(28): Phinx\Db\Table->save() #11 /opt/testrail/vendors/phinx/Migration/Manager/Environment.php(112): AddPrivateKeyToSsoSettingsTable->up() #12 /opt/testrail/vendors/phinx/Migration/Manager.php(382): Phinx\Migration\Manager\Environment->executeMigration() #13 /opt/testrail/vendors/phinx/Migration/Manager.php(356): Phinx\Migration\Manager->executeMigration() #14 /opt/testrail/vendors/phinx/Console/Command/Migrate.php(123): Phinx\Migration\Manager->migrate() #15 /opt/testrail/vendors/symfony/console/Command/Command.php(256): Phinx\Console\Command\Migrate->execute() #16 /opt/testrail/vendors/symfony/console/Application.php(971): Symfony\Component\Console\Command\Command->run() #17 /opt/testrail/vendors/symfony/console/Application.php(290): Symfony\Component\Console\Application->doRunCommand() #18 /opt/testrail/vendors/phinx/Console/PhinxApplication.php(69): Symfony\Component\Console\Application->doRun() #19 /opt/testrail/vendors/phinx/Wrapper/TextWrapper.php(239): Phinx\Console\PhinxApplication->doRun() #20 /opt/testrail/vendors/phinx/Wrapper/TextWrapper.php(117): Phinx\Wrapper\TextWrapper->executeRun() #21 /opt/testrail/sys/libraries/migrations.php(76): Phinx\Wrapper\TextWrapper->getMigrate() #22 /opt/testrail/app/models/update.php(123): Migrations_library->getMigrate() #23 /opt/testrail/app/controllers/updater.php(418): Update_model->migrate() #24 /opt/testrail/sys/base/controller.php(257): Updater_controller->ajax_run_migration() #25 /opt/testrail/sys/base/controller.php(168): Controller->_invoke_web_call() #26 /opt/testrail/sys/base/controller.php(120): Controller->_invoke_web() #27 /opt/testrail/sys/core/gizmo.php(129): Controller->_invoke() #28 /opt/testrail/index.php(114): require_once('/opt/testrail/s...') #29 {main}

I think column was created previous migration because I've checked database before and column wasn't exist.

Test cases with "too many" attachments prevent the use of "Start Progress" button

If we start a test case and add many attachments then the "Start progress" button becomes impossible to click on (even if resizing the window panes). This is poor UI design and resulted in us having to revert back to v7.

Are any of the "cloud releases" e.g. the "Default" release track ever going to be server/docker image releases as they seem to contain a lot of bug fixes and v.8.0.1(1029) is NOT production ready.

Cannot execute this query as it might involve data filtering and thus may have unpredictable performance. If you want to execute this query despite the performance unpredictability, use ALLOW FILTERING

Hi, i have TestRail running in EKS and have External Mysql Database with Cassandra in the K8 cluster. I have recently upgraded TestRail from v7.0 to 7.5.3 becuas v7.0 doesn't use Cassandra so i did not faced any issue but now v7.5.3 is using Cassandra i am having trouble to create Testsuite and Testrun.
I tried following the document - https://support.testrail.com/hc/en-us/articles/7104258815636-Upgrading-TestRail#01G7Y5CCC1FQKCRT8GX8NS62D2 and used the migration script but it just gives me error that attachment table is not there in Cassandra i did created table and required column manually after getting multiple while running the script. I thought Testrail will automatically create the required things in cassandra but i dont know if i am doing anything wrong here. While creating Testsuite i got the error.
image

Any help would be much appreciated.

Too few arguments to function User_model::insert_ex() - automatic user creation failes

The ldap authentication of an user works but the automatic user creation insie testrail fails...


Too few arguments to function User_model::insert_ex(), 11 passed in /var/www/testrail/app/drivers/auth/custom.php on line 142 and at least 12 expected

Details:
File: /var/www/testrail/app/models/user.php
Line: 651
Status Code: 500
Host: testrail.intern.plath.de
Uri: /index.php?/auth/login/XYZ: (POST)

Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0
PHP: 7.3.33
Server: Linux 4.18.0-425.13.1.el8_7.x86_64 #1 SMP Tue Feb 21 19:25:54 UTC 2023 x86_64

name: [email protected]
password:
rememberme: 1

Trace:
at User_model->insert_ex (custom.php:142)
at Auth_custom_driver->_handle_success (custom.php:293)
at Auth_custom_driver->_login (custom.php:314)
at Auth_custom_driver->login (auth.php:750)
at Auth_library->_login_custom (auth.php:738)
at Auth_library->_login (auth.php:540)
at Auth_library->login (auth.php:67)
at Auth_controller->login (controller.php:257)
at Controller->_invoke_web_call (controller.php:168)
at Controller->_invoke_web (controller.php:120)
at Controller->_invoke (gizmo.php:129)
at require_once (index.php:114)

Version: 7.5.3.1000

wrong manifest version

Following the documentation, to build the apache container:
docker build --build-arg ARG_PHP_VERSION=7.2 --build-arg ARG_IONCUBE_VERSION=10.3.9 --build-arg ARG_URL='https://secure.gurock.com/downloads/testrail/testrail-latest-ion71.zip' -t testrail/apache:6.0 .

results in:

[root@testrail:/opt/testrail]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
testrail/mariadb    latest              48571706f35c        2 minutes ago       438MB
testrail/apache     6.0                319666bc13ee        3 minutes ago       745MB
<none>              <none>              a0daa4b2ecea        9 minutes ago       523MB
php                 7.2-apache          4907b55fd512        2 weeks ago         410MB
mysql               5                   c4f186b9e038        2 weeks ago         435MB
 

but in the .env file, the wrong TESTRAIL_VERSION is referenced.

[root@testrail:/opt/testrail]# cat .env
HTTP_PORT=8000
DB_USER=XXXX
DB_NAME=XXXX
DB_PWD=XXXX
DB_ROOT_PWD=XXXX
OPT_PATH=_opt
MYSQL_PATH=_mysql
TESTRAIL_VERSION=1

This results in this error:

[root@testrail:/opt/testrail]# docker-compose up
Pulling srv (testrail/apache:1)...
ERROR: manifest for testrail/apache:1 not found: manifest unknown: manifest unknown

ARM images

When we started to use TestRail, we found that there is an ARM image available for latest version (it was 7.0.2.1014). But since then, there was not any updates for ARM.

Is there any chance you will continue to publish ARM images, or we need to think about moving to x86?

CVEs in the testrail images

The latest testrail images have a lot of CRITICAL CVEs.

How to scan:
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock aquasec/trivy:0.21.0 -d image --severity CRITICAL testrail/php:6.3.1

Screen Shot 2021-11-19 at 1 09 28 PM

One of the possible solutions is to switch base image from php:7.2-fpm to alpine based (e.g. php:7.4-fpm-alpine3.14)

Support for HTTP/2

Hi

I noticed that the Apache configuration for Docker doesn't seem to support HTTP/2 by default. So just wondering if this is on your roadmap anytime. My experiences with PHP and Apache HTTP/2 for another system were that started causing server crashes. However Nginx seemed far more performant in general and HTTP/2 support was far better

404 -> testrail-latest-ion70.zip

Hi,

i'm getting an 404 for this URL: https://secure.gurock.com/downloads/testrail/testrail-latest-ion70.zip

---> a0daa4b2ecea Step 16/30 : RUN wget --no-check-certificate -O /tmp/testrail.zip ${ARG_URL} && mkdir -p /var/www/testrail && mkdir -p /opt/testrail/attachments /opt/testrail/reports /opt/testrail/logs /opt/testrail/audit && unzip /tmp/testrail.zip -d /var/www/ && rm /tmp/testrail.zip && chown -R www-data:www-data /var/www/testrail && chown -R www-data:www-data /opt/testrail ---> Running in 1a9336404a28 --2020-02-17 11:54:28-- https://secure.gurock.com/downloads/testrail/testrail-latest-ion70.zip Resolving secure.gurock.com (secure.gurock.com)... 52.209.240.18 Connecting to secure.gurock.com (secure.gurock.com)|52.209.240.18|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2020-02-17 11:54:28 ERROR 404: Not Found.

This one is working: https://secure.gurock.com/downloads/testrail/testrail-latest-ion71.zip

A TestRail update has been installed but the database hasn't been updated yet. Please contact a TestRail administrator to run the database update.

can anyone help with the steps to upgrade testrail database after using the new testrail upgraded version?
my testrail container is up and running and connected to my RDS database but when i enter username and password to use the tool this error pop-out : A TestRail update has been installed but the database hasn't been updated yet. Please contact a TestRail administrator to run the database update.

note: i tried the testrail migration steps and not working giving me same error

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.