Open main menu

Difference between revisions of "Testing"

(link to the Testing section of Ansible)
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
Testing is software development.   
+
Testing ''is'' software development. Software development is writing code. Testing makes sure the code actually works, so in a nutshell: '''Testing is software development''' :-)  
  
Software development is writing code. Testing makes sure the code actually works, so in a nutshell: '''Testing is software development''' :-)
+
One major aspect of testing - especially '''during''' development and the [[Continuous Integration]] process, is [[static analysis]].<blockquote>Program testing can be used to show the presence of bugs, but never to show their absence!<ref>https://en.wikiquote.org/wiki/Edsger_W._Dijkstra</ref>
== Phan ==
 
see [[Phan]]
 
  
==Other Static Analysis tools for PHP==
+
- Edsger W. Dijkstra (1970)</blockquote>
  
===PHPStan===
+
== See also ==
https://phpstan.org/
 
  
PHPStan seems more polished (perhaps because it's commercial and has a 'pro' version that adds a GUI) whereas phan is the original PHP static analysis tool Rasmus Ledorf uses.
+
* [[Software Quality]]
 
+
* [[Ansible#Testing|Ansible [Testing]]]
Adding a configuration file for your MediaWiki extension is straightforward and would look like this:<syntaxhighlight lang="yaml">
 
parameters:
 
level: 1
 
paths:
 
- src
 
- tests
 
scanDirectories:
 
- ../../includes
 
- ../../tests/phpunit
 
- ../../vendor
 
</syntaxhighlight>
 
 
 
 
 
The [https://phpstan.org/user-guide/rule-levels level can be 0 - 9]
 
 
 
The paths are the directories of '''your code.'''
 
 
 
The scanDirectories are additional paths used to discover symbols, but not analyze for errors.
 
 
 
For more advanced usage, see [https://github.com/ProfessionalWiki/Maps/blob/ee88211fadb3573b646cce005383450e96c3054e/phpstan.neon the example of Professional Wiki's Maps extension] which illustrates configuration file includes of a 'baseline'; error message suppression; and directory exclusions of problem code.
 
 
 
===Psalm===
 
https://psalm.dev/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
<references />
 
  
 +
<br />
 
[[Category:Wiki]]
 
[[Category:Wiki]]
 
[[Category:MediaWiki]]
 
[[Category:MediaWiki]]
Line 53: Line 19:
 
[[Category:Tools]]
 
[[Category:Tools]]
 
[[Category:Continuous Integration]]
 
[[Category:Continuous Integration]]
 +
<references />

Latest revision as of 12:35, 26 February 2024

Testing is software development. Software development is writing code. Testing makes sure the code actually works, so in a nutshell: Testing is software development :-)

One major aspect of testing - especially during development and the Continuous Integration process, is static analysis.

Program testing can be used to show the presence of bugs, but never to show their absence![1] - Edsger W. Dijkstra (1970)

See also