<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://tech.uvoo.io/index.php?action=history&amp;feed=atom&amp;title=Test-plan</id>
	<title>Test-plan - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://tech.uvoo.io/index.php?action=history&amp;feed=atom&amp;title=Test-plan"/>
	<link rel="alternate" type="text/html" href="https://tech.uvoo.io/index.php?title=Test-plan&amp;action=history"/>
	<updated>2026-04-05T17:50:38Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.2</generator>
	<entry>
		<id>https://tech.uvoo.io/index.php?title=Test-plan&amp;diff=103&amp;oldid=prev</id>
		<title>imported&gt;Justin: Created page with &quot;# Test Plan  What is the purpose of testing? 1. to ensure high quality code 2. to find and eliminate bugs  This test plan is designed to accomplish those goals.  ## Principle:...&quot;</title>
		<link rel="alternate" type="text/html" href="https://tech.uvoo.io/index.php?title=Test-plan&amp;diff=103&amp;oldid=prev"/>
		<updated>2019-01-14T22:56:54Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;# Test Plan  What is the purpose of testing? 1. to ensure high quality code 2. to find and eliminate bugs  This test plan is designed to accomplish those goals.  ## Principle:...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;# Test Plan&lt;br /&gt;
&lt;br /&gt;
What is the purpose of testing?&lt;br /&gt;
1. to ensure high quality code&lt;br /&gt;
2. to find and eliminate bugs&lt;br /&gt;
&lt;br /&gt;
This test plan is designed to accomplish those goals.&lt;br /&gt;
&lt;br /&gt;
## Principle: Write Tests For things that Make sense &lt;br /&gt;
&lt;br /&gt;
Testing works well for certain components and doesn't work so well for others. Most tutorials focus on pure functions with simple input and output, and ignore more complex state problems.&lt;br /&gt;
&lt;br /&gt;
The ideal testing situation is for a function or program which must handle a wide variety of inputs, such as a parser, or compiler. In these cases the quality of the program can be greatly improved by regularly running against a large data set.&lt;br /&gt;
&lt;br /&gt;
### Guideline&lt;br /&gt;
&lt;br /&gt;
- Create tests for all tools that follow a unix stdin stdout pattern. We expect these tools to be the foundation of our project.&lt;br /&gt;
- Create tests for pure functions.&lt;br /&gt;
- Do not unit test trivial state changes.&lt;br /&gt;
- Document the purpose of a test. If the test does not have a clear purpose it probably is just affirming the developer's original assumptions.&lt;br /&gt;
&lt;br /&gt;
## Principle: KISS&lt;br /&gt;
&lt;br /&gt;
A lot of time can be spent fiddling with test frameworks. Tests also increase the amount of time to adapt to new business logic.&lt;br /&gt;
&lt;br /&gt;
### Guideline&lt;br /&gt;
&lt;br /&gt;
- Avoid using a large testing library. Prefer simple functions.&lt;br /&gt;
- Avoid complex mock scaffoldings.&lt;br /&gt;
- Use assertions heavily directly in the code.&lt;br /&gt;
&lt;br /&gt;
## Principle: Prefer Correctness&lt;br /&gt;
&lt;br /&gt;
&amp;gt; Program testing can be used to show the presence of bugs, but never to show their absence - Dijsktra&lt;br /&gt;
&lt;br /&gt;
Tests can only identify bugs for particular inputs, while a proof can very for the correctness for all inputs. When possible prefer to verify correctness.&lt;br /&gt;
&lt;br /&gt;
A good example, was Alpheus and Justin working on the panel sizing system. They framed the problem mathematically and proved a valid solution. This mathematical notation was documented in the code, and was used to write several other helpful functions using the same ideas.&lt;br /&gt;
&lt;br /&gt;
### Guideline&lt;br /&gt;
&lt;br /&gt;
- Describe problems in mathematical language when possible. (This usually simplifies the code and the problem.)&lt;br /&gt;
- Prove algorithms mathematically and document them in the code, using latex syntax.&lt;br /&gt;
- Identify and document invariants with assertions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# References&lt;br /&gt;
&lt;br /&gt;
https://medium.com/welldone-software/an-overview-of-javascript-testing-in-2018-f68950900bc3&lt;br /&gt;
&lt;br /&gt;
https://philipwalton.com/articles/how-to-unit-test-private-functions-in-javascript/&lt;br /&gt;
&lt;br /&gt;
https://medium.freecodecamp.org/learnbydiy-how-to-create-a-javascript-unit-testing-framework-from-scratch-c94e0ba1c57a&lt;br /&gt;
&lt;br /&gt;
http://wiki.c2.com/?ShouldUnitTestsTestInternalFunctions&lt;/div&gt;</summary>
		<author><name>imported&gt;Justin</name></author>
	</entry>
</feed>