WackoWiki: Testing

https://wackowiki.org/doc     Version: 86 (19.05.2024 06:41)


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.

  1. TodoList[link1]
  2. https://wackowiki.org/lab/
  3. Setup a local Test Server[link2]

wackowiki-6.1.25.zip[link3] (2.2 MiB)

Please download the program, take it for a test-drive and tell us what you think.
BETA versions are always for testing purposes only.

Development version
wacko.tar.gz[link4] (see Repository[link5])

Keep in mind, that this is still an alpha version - so be advised to not use it for production data!


1. Tools

2. Testing

  1. Test new patches - try them out and see what breaks
  2. Do performance tests - compare versions & settings
  3. Do security audits
  4. Do benchmarks
  5. Do localization checks
  6. Check standards / spec compliance - SQL, XML, APIs, ...
    1. https://developers.google.com/speed/pagespeed/insights/
    2. https://securityheaders.io
    3. HTML validator[link15]
    4. CSS validator[link16]
    5. Feed validator[link17]
    6. https://web.dev/measure
    7. WAVE – Online accessibility validator[link18]
    8. http://jshint.com
    9. https://www.google.com/webmast[...]ols/mobile-friendly/[link19]
    10. http://www.webpagetest.org - Test a website's performance
    11. W3C Internationalization Checker[link20]
    12. REDbot[link21] - lint for HTTP resources; it tests protocol correctness, cacheability, content negotiation and more.

  1. https://github.com/mozilla/readability - test with firefox reading mode
  2. Test integration - does the new version work with all scripts & dbs?

3. Debugging

  1. check error logs
    1. \apache\logs\error.log
    2. \php\logs\php_error_log

3.1. Debug options

3.1.1. Primary config

  1. set sql_mode_strict in primary config to 1 to enable SQL Strict mode
     'sql_mode_strict' => '1',	

3.1.2. Secondary config

debug and query caching option
enable the debug option to show all executed SQL queries and disable the query caching option

config table (Admin Panel -> System)
  1. set 'debug' in secondary config to 3
  2. set cache in secondary config to 0
  3. set cache_sql in secondary config to 0

3.1.3. Constants

  1. set DB_ERROR_MODE in config/constants.php
    const DB_ERROR_MODE	= 1;	
    1. Warning
    2. Exception (Fatal error)
  2. set PHP_ERROR_REPORTING in config/constants.php
    const PHP_ERROR_REPORTING	= 6;	
    1. Fatal error
    2. Parse error
    3. Warning
    4. 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

  1. to write a parameter in the debug log
    • Ut::dbg('debug_variable', $parameter);
  2. 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);

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