Testing
Quality Assurance (QA): Test our release packages. Install them from scratch, try updates from previous versions, make sure everything is working, check if the upgrader works along the different (Repo-)Versions. The chain breaks at the weakest link. |
wackowiki-6.1.26.zip (2.3 MiB)
Please download the program, take it for a test-drive and tell us what you think. Development version Keep in mind, that this is still an alpha version - so be advised to not use it for production data!
¯\_(ツ)_/¯ |
1. Tools
- XAMPP
- PHPUnit
- https://www.codacy.com
- http://xdebug.org
- https://phpstan.org
- 🦊 Firefox
- Web Developer
- Quick Locale Switcher
- User Agent Switcher
- uMatrix
- Livemarks - FF 64 removed the RSS reader!
- Laboratory (Content Security Policy / CSP Toolkit)
- Lynx - Do the test, all essential functionality must work WHITHOUT JavaScript.
-
lynx https://wackowiki.org/doc/Doc/English/Markup
-
2. Testing
- Test new patches - try them out and see what breaks
- Do performance tests - compare versions & settings
- Do security audits
- Do benchmarks
- Do localization checks
- Check standards / spec compliance - SQL, XML, APIs, ...
- https://developers.google.com/speed/pagespeed/insights/
- https://securityheaders.io
- HTML validator
- CSS validator
- Feed validator
- https://web.dev/measure
- WAVE – Online accessibility validator
- http://jshint.com
- http://www.webpagetest.org - Test a website's performance
- W3C Internationalization Checker
- REDbot - lint for HTTP resources; it tests protocol correctness, cacheability, content negotiation and more.
- https://github.com/mozilla/readability - test with firefox reading mode
- Test integration - does the new version work with all scripts & dbs?
3. Debugging
- check error logs
-
\apache\logs\error.log
-
\php\logs\php_error_log
-
3.1. Debug options
3.1.1. Primary config
config/config.php
- set
sql_mode
in primary config to2
to enable SQL Session Strict mode'sql_mode' => '2',
3.1.2. Secondary config
config table (Admin Panel -> System)
- set '
debug
' in secondary config to3
- set
cache
in secondary config to0
- set
cache_sql
in secondary config to0
3.1.3. Constants
config/constants.php
- set
DB_ERROR_MODE
in config/constants.phpconst DB_ERROR_MODE = 1;
- Warning
- Exception (Fatal error)
- set
PHP_ERROR_REPORTING
in config/constants.phpconst PHP_ERROR_REPORTING = 6;
- Fatal error
- Parse error
- Warning
- Notice
3.2. php_error_log
[19-May-2022 11:31:23 Mittelerde/Auenland] PHP Deprecated: preg_match_all(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/hobbit/git/wackowiki/src/formatter/class/typografica.php on line 134 [19-May-2022 11:31:23 Mittelerde/Auenland] PHP Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/hobbit/git/wackowiki/src/formatter/class/typografica.php on line 135
3.3. Debug functions
- to write a parameter in the debug log
-
Ut::dbg('debug_variable', $parameter);
-
- add debug output to DEBUG file and popup-window in browser
-
Diag::dbg($parameter);
- to highlight the debug output in the console add
'[BLUE|GOLD|ORANGE|RED]'
as the first argument- e.g.
Diag::dbg('GOLD', $parameter);
-
Diag::dbg('GOLD', 'Message set:', $lang, $name, @$this->user_lang, @$this->page_lang, @$this->notify_lang);
- e.g.
-
3.3.1. Example
Diag::dbg('preprocess', $parser->preprocess ? 'true' : 'false');
; -0.2427 formatter/wacko.php:50 preprocess false -0.2365 formatter/wacko.php:50 preprocess true -0.0547 formatter/wacko.php:50 preprocess false 0.0332 formatter/wacko.php:50 preprocess false
3.3.2. File permissions
In both cases it writes the $parameter
to the log in the main directory src/DEBUG
when the config debug
is enabled.
Be aware the log isn't emptied automatically. Ensure that the file src/DEBUG
can be created and is writable.
touch DEBUG chmod 0664 DEBUG