View source for Testing

#||
||
%%(wacko wrapper=page wrapper_width=700)%%
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))
  1. https://wackowiki.org/lab/
  2. ((/Org/Tools/Hosting/TestServer Setup a local Test Server))
 | {{toc numerate=1}}  
{{include page="/Download/Stable" nomark=2}}
Please download the program, take it for a test-drive and tell us what you think. 
BETA versions are always for testing purposes only. 
{{include page="/Download/DevelopmentVersion" nomark=1}}
Keep in mind, that this is still an alpha version - so be advised to not use it for production data!


 ||
||#
===Tools===
  * ((http://www.apachefriends.org/en/xampp.html XAMPP))
  * ((http://www.phpunit.de/ PHPUnit))
  * http://xdebug.org/
  * 🦊 Firefox
    * ((http://chrispederick.com/work/web-developer/ Web Developer))
    * ((https://addons.mozilla.org/de/firefox/addon/quick-locale-switcher2/ Quick Locale Switcher))
    * ((https://addons.mozilla.org/de/firefox/addon/uaswitcher/ User Agent Switcher))
    * ((https://addons.mozilla.org/en-US/firefox/addon/umatrix/ uMatrix))
    * ((https://addons.mozilla.org/de/firefox/addon/livemarks/ Livemarks)) - FF 64 removed the RSS reader! 
    * ((https://addons.mozilla.org/en-US/firefox/addon/laboratory-by-mozilla/ 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 %%

===Testing==
  1. Test new patches - try them out and see what breaks
  1. Do performance tests - compare versions & settings
  1. Do security audits
  2. Do benchmarks
  3. Do localization checks
  1. Check standards / spec compliance - SQL, XML, APIs, ...
    1. https://developers.google.com/speed/pagespeed/insights/
    2. https://securityheaders.io/
    2. ((http://validator.w3.org/nu/ HTML validator))
    3. ((https://jigsaw.w3.org/css-validator/ CSS validator))
    3. ((https://validator.w3.org/feed/ Feed validator))
    4. https://web.dev/measure
    4. ((http://wave.webaim.org/ WAVE – Online accessibility validator))
    3. http://jshint.com/
    3. https://www.google.com/webmasters/tools/mobile-friendly/
    4. http://www.webpagetest.org/ - Test a website's performance
    5. ((https://validator.w3.org/i18n-checker/ W3C Internationalization Checker))
  1. https://github.com/mozilla/readability - test with firefox reading mode
  1. Test integration - does the new version work with all scripts & dbs?

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

====Debug options====

=====Primary config=====
config/config.php
  1. set ##sql_mode_strict## in primary config to ##1## to enable SQL Strict mode %% 'sql_mode_strict' => '1', %%

=====Secondary config=====
file:/ap_system_settings_debug_en.png?500&right&caption
config table (Admin Panel -> System)
  1. set '##debug##' in secondary config to ##3##
  1. set ##cache_sql## in secondary config to ##0##

=====Constants=====
config/constants.php
  1. set ##DB_ERROR_MODE## in config/constants.php %%const DB_ERROR_MODE	= 2;%%
    1. Warning
    1. Exception (Fatal error)
  1. set ##PHP_ERROR_REPORTING## in config/constants.php %%const PHP_ERROR_REPORTING	= 6;%%
    1. Fatal error
    1. Parse error
    1. Warning
    1. Notice

====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/wacko/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/wacko/formatter/class/typografica.php on line 135
%%
====Debug functions====
  1. to write a parameter in the debug log
    * ##Ut::dbg('debug_variable', $parameter);##
  1. 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);##

=====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
%%

=====File permissions=====
In both cases it writes the ##$parameter## to the log in the main directory ##wacko/DEBUG## when the config ##debug## is enabled. 
Be aware the log isn't emptied automatically. **Ensure** that the file ##wacko/DEBUG## can be created and is writable.
%%
touch DEBUG
chmod 0664 DEBUG
%%