https://paradisestation.org/wiki/index.php?title=Guide_to_Testing_Your_Pull_Request&feed=atom&action=historyGuide to Testing Your Pull Request - Revision history2024-03-28T15:47:48ZRevision history for this page on the wikiMediaWiki 1.37.2https://paradisestation.org/wiki/index.php?title=Guide_to_Testing_Your_Pull_Request&diff=38344&oldid=prevSirryan2002: adding wip lable2022-08-10T23:05:09Z<p>adding wip lable</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 23:05, 10 August 2022</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>{{SidebarGithub}}</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>{{SidebarGithub}}</div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">{{Wip|assign=Sirryan2002}}</ins></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Code by nature works ''as coded'' and not always ''as intended'', while you know that your code compiles and passes tests on your Pull Request you may not know if it breaks in edge cases or works fully in-game. In order to ensure your changes actually work, you will need to know how to '''Test Your Code'''. As part of this process, you will learn how to use various in-game debugging tools to fully utilize your changes in a test server, analyze variables at run-time, test for edge cases, and stress test features. This guide will also explain more advanced concepts and testing such as advanced proc calls, garbage collection testing, and breakpoints.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Code by nature works ''as coded'' and not always ''as intended'', while you know that your code compiles and passes tests on your Pull Request you may not know if it breaks in edge cases or works fully in-game. In order to ensure your changes actually work, you will need to know how to '''Test Your Code'''. As part of this process, you will learn how to use various in-game debugging tools to fully utilize your changes in a test server, analyze variables at run-time, test for edge cases, and stress test features. This guide will also explain more advanced concepts and testing such as advanced proc calls, garbage collection testing, and breakpoints.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
</table>Sirryan2002https://paradisestation.org/wiki/index.php?title=Guide_to_Testing_Your_Pull_Request&diff=38340&oldid=prevSirryan2002: /* Does it Even Work? */2022-08-10T22:13:27Z<p><span dir="auto"><span class="autocomment">Does it Even Work?</span></span></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 22:13, 10 August 2022</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l54">Line 54:</td>
<td colspan="2" class="diff-lineno">Line 54:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The first step in testing is to see if your change spawns in/displays ''at all''. This part of testing focuses solely on finding out when and where your changes break, not particularly how or why it breaks.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The first step in testing is to see if your change spawns in/displays ''at all''. This part of testing focuses solely on finding out when and where your changes break, not particularly how or why it breaks.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>If your change is creation/removal of an atom. open up the [[#Game Panel|Game Panel]] and see if the atom has been added/removed as a typepath, if it's not, make sure your code was actually compiled and check to either see if you A) actually defined a new typepath properly and have the file ticked in the DME file and B) you removed ALL instances where the type path is used (even proc definitions!). If your change is a map change, please see [[<del style="font-weight: bold; text-decoration: none;">#Testing Map Changes|Testing Map Changes</del>]]. </div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>If your change is creation/removal of an atom. open up the [[#Game Panel|Game Panel]] and see if the atom has been added/removed as a typepath, if it's not, make sure your code was actually compiled and check to either see if you A) actually defined a new typepath properly and have the file ticked in the DME file and B) you removed ALL instances where the type path is used (even proc definitions!). If your change is a map change, please see <ins style="font-weight: bold; text-decoration: none;">the </ins>[[<ins style="font-weight: bold; text-decoration: none;">Guide to Mapping</ins>]]. </div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Use the game panel to spawn your atom with the given type path:</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Use the game panel to spawn your atom with the given type path:</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l74">Line 74:</td>
<td colspan="2" class="diff-lineno">Line 74:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* Know the code so that you know what other objects or parts of a feature will be affected, then you have a mental list of things that need to be tested.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* Know the code so that you know what other objects or parts of a feature will be affected, then you have a mental list of things that need to be tested.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* Focus on testing one feature at a time, especially ones that you're focused on coding at the moment; This keeps your attention scoped to that feature so you can quickly make the needed changes and move on (this will help avoid "''scope-creep''.")</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* Focus on testing one feature at a time, especially ones that you're focused on coding at the moment; This keeps your attention scoped to that feature so you can quickly make the needed changes and move on (this will help avoid "''scope-creep''.")</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>* If your feature is built on another feature working (i.e. your feature working ''depends'' completely on another feature working properly), test the dependency if your feature is breaking to ensure the point of failure isn't just a dependency breaking. </div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>* If your feature is built on another feature working (i.e. your feature working ''depends'' completely on another feature working properly), test the dependency if your feature is breaking to ensure the point of failure isn't just a dependency breaking.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==Why Doesn't it Work?==</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==Why Doesn't it Work?==</div></td></tr>
</table>Sirryan2002https://paradisestation.org/wiki/index.php?title=Guide_to_Testing_Your_Pull_Request&diff=38339&oldid=prevSirryan2002 at 21:58, 10 August 20222022-08-10T21:58:47Z<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 21:58, 10 August 2022</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l6">Line 6:</td>
<td colspan="2" class="diff-lineno">Line 6:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* Give yourself host-level permissions on your local server (You should have access to every verb and tab available in-game).</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* Give yourself host-level permissions on your local server (You should have access to every verb and tab available in-game).</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* Have an open and patient mindset.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* Have an open and patient mindset.</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>* Approach the QA process as if you're asking yourself questions and answering them by performing successful (or unsuccessful tests<del style="font-weight: bold; text-decoration: none;">)</del>.</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>* Approach the QA process as if you're asking yourself questions and answering them by performing successful (or unsuccessful<ins style="font-weight: bold; text-decoration: none;">) </ins>tests.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>===Prep Work===</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>===Prep Work===</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l54">Line 54:</td>
<td colspan="2" class="diff-lineno">Line 54:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The first step in testing is to see if your change spawns in/displays ''at all''. This part of testing focuses solely on finding out when and where your changes break, not particularly how or why it breaks.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The first step in testing is to see if your change spawns in/displays ''at all''. This part of testing focuses solely on finding out when and where your changes break, not particularly how or why it breaks.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>If your change is creation/removal of an atom. open up the [[#Game Panel|Game Panel]] and see if the atom has been added/removed as a typepath, if it's not, make sure your code was actually compiled and check to either see if you A) actually defined a new typepath properly and have the file ticked in the DME file and B) you removed ALL instances where the type path is used (even proc definitions!). If your change is a map change, please see [[#Testing Map Changes|Testing Map Changes]]. Use the game panel to spawn your atom with the given type path:</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>If your change is creation/removal of an atom. open up the [[#Game Panel|Game Panel]] and see if the atom has been added/removed as a typepath, if it's not, make sure your code was actually compiled and check to either see if you A) actually defined a new typepath properly and have the file ticked in the DME file and B) you removed ALL instances where the type path is used (even proc definitions!). If your change is a map change, please see [[#Testing Map Changes|Testing Map Changes]]. </div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> </div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Use the game panel to spawn your atom with the given type path:</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* Does it appear? </div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* Does it appear? </div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* Is the sprite correct? </div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* Is the sprite correct? </div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l66">Line 66:</td>
<td colspan="2" class="diff-lineno">Line 68:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* Does your new turf have proper atmospherics?</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* Does your new turf have proper atmospherics?</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>You may not have touched a certain section of code, but it's entirely possible that you broke it with a nearby change, check to make sure it still works the way it's supposed to (or even at all). For example, if you modified <del style="font-weight: bold; text-decoration: none;">the </del>variable inside <del style="font-weight: bold; text-decoration: none;">the </del>book object, can the barcode scanner still scan it into the library system? If you changed the way xenomorphs handle combat, will disablers, lasers, batons, etc still work the same way or <del style="font-weight: bold; text-decoration: none;">do anything</del>? </div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>You may not have touched a certain section of code, but it's entirely possible that you broke it with a nearby change, check to make sure it still works the way it's supposed to (or even at all). For example, if you modified <ins style="font-weight: bold; text-decoration: none;">a </ins>variable inside <ins style="font-weight: bold; text-decoration: none;">a </ins>book object, can the barcode scanner still scan it into the library system? If you changed the way xenomorphs handle combat, will disablers, lasers, batons, etc still work the same way or <ins style="font-weight: bold; text-decoration: none;">function at all</ins>? </div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Your goal here is to break your change in every (relevant) way possible, use your change in every way you intended it to be used and then use it every way it wasn't intended to be used. <del style="font-weight: bold; text-decoration: none;">This </del>isn't to say you need to <del style="font-weight: bold; text-decoration: none;">throw </del>every <del style="font-weight: bold; text-decoration: none;">atom </del>you <del style="font-weight: bold; text-decoration: none;">add </del>to the <del style="font-weight: bold; text-decoration: none;">game to check if it throws properly </del>or <del style="font-weight: bold; text-decoration: none;">see if it's deleted properly by being exploded</del>, <del style="font-weight: bold; text-decoration: none;">however</del>, you <del style="font-weight: bold; text-decoration: none;">would want </del>to <del style="font-weight: bold; text-decoration: none;">check those if </del>you <del style="font-weight: bold; text-decoration: none;">changed </del>the <del style="font-weight: bold; text-decoration: none;">way the object is handled being thrown or responded to <code>ex_act</del>()<del style="font-weight: bold; text-decoration: none;"></code> being called </del>on <del style="font-weight: bold; text-decoration: none;">it</del>. <del style="font-weight: bold; text-decoration: none;">Keep </del>your <del style="font-weight: bold; text-decoration: none;">testing focused but open-minded</del>.</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">===Be Concise and Specific===</ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Your goal here is to break your change in every (relevant) way possible, use your change in every way you intended it to be used and then use it every way it wasn't intended to be used. <ins style="font-weight: bold; text-decoration: none;">However, this </ins>isn't to say you need to <ins style="font-weight: bold; text-decoration: none;">test every use case or test </ins>every <ins style="font-weight: bold; text-decoration: none;">single object that may be affected. As a contributor, </ins>you <ins style="font-weight: bold; text-decoration: none;">have limited time in your day </ins>to <ins style="font-weight: bold; text-decoration: none;">spend on coding, don't waste all of it trying out every different testing scenario. Here are a few tips to be efficient:</ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">* Know </ins>the <ins style="font-weight: bold; text-decoration: none;">code so that you know what other objects </ins>or <ins style="font-weight: bold; text-decoration: none;">parts of a feature will be affected</ins>, <ins style="font-weight: bold; text-decoration: none;">then you have a mental list of things that need to be tested.</ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">* Focus on testing one feature at a time</ins>, <ins style="font-weight: bold; text-decoration: none;">especially ones that </ins>you<ins style="font-weight: bold; text-decoration: none;">'re focused on coding at the moment; This keeps your attention scoped </ins>to <ins style="font-weight: bold; text-decoration: none;">that feature so </ins>you <ins style="font-weight: bold; text-decoration: none;">can quickly make </ins>the <ins style="font-weight: bold; text-decoration: none;">needed changes and move on </ins>(<ins style="font-weight: bold; text-decoration: none;">this will help avoid "''scope-creep''."</ins>)</div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">* If your feature is built </ins>on <ins style="font-weight: bold; text-decoration: none;">another feature working (i.e</ins>. your <ins style="font-weight: bold; text-decoration: none;">feature working ''depends'' completely on another feature working properly), test the dependency if your feature is breaking to ensure the point of failure isn't just a dependency breaking</ins>. </div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==Why Doesn't it Work?==</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==Why Doesn't it Work?==</div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">The previous question of "does it work" often answers itself just by spooling up a test environment, however, figuring out why things break is a much more difficult and in-depth task. This section will avoid getting into technical discussion and will instead explore conceptually how to begin understanding why your change is not working.</ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">===Does it Produce Errors?===</ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">Changes that clearly break often come saddled with a few ''runtimes'' which are errors that occur while the server is actively running. In your preferences tab, you can click the ''Toggle Debug Log Messages'' verb to toggle on debug message which will allow you to see runtimes pop up exactly when they happen in the chat box. You will need to do this every round unless you have a database properly set up. Additionally, you can view all runtimes in a round by clicking the [[#Runtime Viewer|''view runtimes'']] verb in the debug tab to open up the runtime viewer.</ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">This will allow you to identify the errors your changes are producing and possibly even identify where, how, and what is breaking in your code. Do note that this will often not reveal larger issues with your code that is sourced from bad design decisions or unintentional effects. </ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">===Assertion Checking===</ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">Sometimes the values are incorrect for</ins></div></td></tr>
</table>Sirryan2002https://paradisestation.org/wiki/index.php?title=Guide_to_Testing_Your_Pull_Request&diff=38335&oldid=prevSirryan2002: Created page with "{{SidebarGithub}} Code by nature works ''as coded'' and not always ''as intended'', while you know that your code compiles and passes tests on your Pull Request you may not know if it breaks in edge cases or works fully in-game. In order to ensure your changes actually work, you will need to know how to '''Test Your Code'''. As part of this process, you will learn how to use various in-game debugging tools to fully utilize your changes in a test server, analyze variables..."2022-08-10T08:44:59Z<p>Created page with "{{SidebarGithub}} Code by nature works ''as coded'' and not always ''as intended'', while you know that your code compiles and passes tests on your Pull Request you may not know if it breaks in edge cases or works fully in-game. In order to ensure your changes actually work, you will need to know how to '''Test Your Code'''. As part of this process, you will learn how to use various in-game debugging tools to fully utilize your changes in a test server, analyze variables..."</p>
<p><b>New page</b></p><div>{{SidebarGithub}}<br />
Code by nature works ''as coded'' and not always ''as intended'', while you know that your code compiles and passes tests on your Pull Request you may not know if it breaks in edge cases or works fully in-game. In order to ensure your changes actually work, you will need to know how to '''Test Your Code'''. As part of this process, you will learn how to use various in-game debugging tools to fully utilize your changes in a test server, analyze variables at run-time, test for edge cases, and stress test features. This guide will also explain more advanced concepts and testing such as advanced proc calls, garbage collection testing, and breakpoints.<br />
<br />
==Prerequisites==<br />
* You will need to first [[Guide to Contributing|learn how to start contributing]] and successfully launch a local server. <br />
* Give yourself host-level permissions on your local server (You should have access to every verb and tab available in-game).<br />
* Have an open and patient mindset.<br />
* Approach the QA process as if you're asking yourself questions and answering them by performing successful (or unsuccessful tests).<br />
<br />
===Prep Work===<br />
In order to speed this up, especially for experienced devs, know what you're looking for and write down a list (mental lists work as well) of what you want to test. If you're only changing an attribute, list the interactions that attribute has with other functions so you remember to test each one. If you're adding a new atom, write down possible interactions that atom may have with other relevant atoms (think parent objects, tools, materials, machinery such as autholathes, antagonists).<br />
<br />
Make your tests atomic. i.e. don't try and test everything at once, pick one specific thing (or closely related groups of things) to test on. If your item affects other items you want to test, consider restarting and using a clean round or properly cleaning up the test area.<br />
<br />
===Basic In-Game Tools===<br />
While mastery of these tools is not required, basic familiarity with them will be paramount to proper testing.<br />
<div class="toccolours mw-collapsible mw-collapsed" style="width:99%"><br />
====Game Panel====<br />
The Game Panel is a small menu that allows the user to set the game mode for the round or spawn in atoms (turfs, objects, mobs, etc). In order to access the Game Panel, you will need to click the ''Game Panel'' verb under the admin tab.<br />
<div class="mw-collapsible-content"><br />
[[File:Game Panel.png|200px|right]]<br />
The Game panel has 5 buttons:<br />
<br />
'''Change Gamemode''' - will allow the user to set the round game mode, this is only binding if the round has not started yet.<br><br />
'''Create Object ''' - Allows the user to spawn in any object, the search bar will return all type paths relevant to the search given<br><br />
'''Quick Create Object ''' - Allows the user to search for objects in a more specific scope (only guns, only mechs, etc)<br><br />
'''Create Turf''' - Allows the user to change the turf they are directly over<br><br />
'''Create Mob''' - Allows the user to spawn in a mob<br><br />
<br />
The most important buttons are the 4 create buttons. By clicking on them you can open up the game panel create menu. For beginners, there are 5 important aspects of the game panel that you will need to know (the other inputs and buttons are very sparsely used, and likely not needed in your case).<br />
<br />
# The type path to search for, this input will tell the panel to query for any typepath that contains the given string, so if you searched for "book" it would return type paths such as "machinery/bookBinder", "spellbook/mime/oneuse", or "book/codex_gigas". Keep in mind this will return ''all'' type paths with the given string, since the game panel is tied to your client CPU usage, trying to search type paths with a query such as "item" or "mob" will return thousands of results and likely freeze your client for some time or crash it.<br />
# The number or amount of the element you want to spawn, if you were spawning a book and typed in three, it would spawn three books.<br />
# Where this object will spawn, generally you will want the default "On the floor below mob" or if you're a human, "in own mob's hands". If you're specifically trying to spawn the element inside another object, you can mark the object and use that option.<br />
# The list of type paths to select, you will need to click the typepath to select it. Alternatively, if you want to spawn in multiple types at once, you can click-drag up to 5 type paths and spawn them all at once.<br />
# The button that spawns stuff with the parameters you gave the panel.<br />
[[File:Game Panel Create.png|250px]]<br />
</div></div><br />
<div class="toccolours mw-collapsible mw-collapsed" style="width:99%"><br />
====Runtime Viewer====<br />
The runtime viewer interface is a menu that displays every runtime that occurred during the current round. It is available by clicking the ''View Runtimes'' verb under the debub tab.<br />
<div class="mw-collapsible-content"><br />
[[File:Runtime Viewer.png|300px|right]]<br />
The runtime viewer displays a list of ''almost'' every runtime in a round, a few unimportant or repeated runtimes are skipped. Essentially, runtimes are errors that occur when the server is running (as compared to a build error that occurs when attempting to compile). Clicking on a runtime will open up more details about it.<br />
# The runtime error. This will generally include information about the type of error (null reference, bad proc calls, etc), what file it occurred in, what line it occurred at, and information about the proc it occurred in. Some errors will also include "call stacks" or the procs called leading up to the error.<br />
# user VV button, will open the view variables panel on the mob that caused the runtime<br />
# user PP button, will open the player panel on the mob that caused the runtime<br />
# user follow button, will force the user to follow/orbit the mob that caused the runtime<br />
# loc VV button, will open the view variables panel on the loc (turf or thing that contains the object) of the object that caused the runtime<br />
# loc jump button, will force the user to jump to the loc where the runtime occurred.<br />
[[File:Runtime Viewer View Runtime.png|400px]]<br />
</div></div><br />
==Does it Even Work?==<br />
The first step in testing is to see if your change spawns in/displays ''at all''. This part of testing focuses solely on finding out when and where your changes break, not particularly how or why it breaks.<br />
<br />
If your change is creation/removal of an atom. open up the [[#Game Panel|Game Panel]] and see if the atom has been added/removed as a typepath, if it's not, make sure your code was actually compiled and check to either see if you A) actually defined a new typepath properly and have the file ticked in the DME file and B) you removed ALL instances where the type path is used (even proc definitions!). If your change is a map change, please see [[#Testing Map Changes|Testing Map Changes]]. Use the game panel to spawn your atom with the given type path:<br />
* Does it appear? <br />
* Is the sprite correct? <br />
* Is the name/appearance/description of the atom correct?<br />
{{Note|An Atom in DM refers to all elements of type "area", "turf", "object", or "mob." Each has different behaviors for spawning, deletion, and interaction so keep that in mind. Additionally, there will not be much reference/relevance in this section to "Area" type atoms.}}<br />
===Does it Work the Way You Want it to?===<br />
Test the attributes of your atom:<br />
* If it has health, can you kill or break it? <br />
* If it has a menu, can you open up and interact with the UI correctly, can you press buttons? <br />
* If you added a special feature, can you activate it correctly? <br />
* Does your new turf have proper atmospherics?<br />
<br />
You may not have touched a certain section of code, but it's entirely possible that you broke it with a nearby change, check to make sure it still works the way it's supposed to (or even at all). For example, if you modified the variable inside the book object, can the barcode scanner still scan it into the library system? If you changed the way xenomorphs handle combat, will disablers, lasers, batons, etc still work the same way or do anything? <br />
<br />
Your goal here is to break your change in every (relevant) way possible, use your change in every way you intended it to be used and then use it every way it wasn't intended to be used. This isn't to say you need to throw every atom you add to the game to check if it throws properly or see if it's deleted properly by being exploded, however, you would want to check those if you changed the way the object is handled being thrown or responded to <code>ex_act()</code> being called on it. Keep your testing focused but open-minded.<br />
<br />
==Why Doesn't it Work?==</div>Sirryan2002