TestLink is an open source tool for test plan management, managing builds and getting reports and stats on your projects. It facilitates software quality assurance. During the first time user is login in, you can start your first test project, write your requirements, link requirements to test cases, or create test plans.
Unfortunately, when a user wanted to do some test which including upload a big attachment, the default value is only 2MB. Hence, we need to increase the size of it.
Step by step guide to increase Testlink upload limit as follows:
- Login to your testlink server by SSH or access the remote/physical console.
- Search where is the config.inc.php file located. Normally it should be inside the testlink htdocs folder. You may use this command to check:
find / -type f -name config.inc.php
Once you get your location of config.inc.php, do edit by typing vim config.inc.php ; and look out for these three configuration:
$tlCfg->repository_max_filesize: 8 // MB
On above example, the configuration was changing from 2MB (default) to 8MB of limit. But there is another files you need to check before finishing this tutorial. You need to check what is the php.ini settings configuration for uploading file.
find / -type f -name php.ini
Once you have found the result, vim to that file. Find these configuration:
; Maximum size of POST data that PHP will accept. post_max_size = 16M ; Maximum allowed size for uploaded files. upload_max_filesize = 16M
The value above, must be bigger/equals than the config.inc.php settings on the testlink configuration file. Hence, if you put lower than the testlink config, php error will be thrown inside your php log.
If you’re happy with the changes, save it and reboot the apache server.
But, if you are using TestLink application from Bitnami (https://bitnami.com/stack/testlink) you might need to adjust another parameter since the default Web server configuration limits are too low. Bitnami has httpd.conf file defaulted for its apache2 server.
Increase below’s limits in the /opt/bitnami/apache2/conf/httpd.conf file, by setting the LimitRequestBody parameter to a new value in MB, as shown below and restart the Apache server:
LimitRequestBody 16384 #once finished, restart the service. sudo /opt/bitnami/ctlscript.sh restart
That’s it, it is should be simple. Make sure you are logging in again once the restart finished.