IT Glossary https://tigosoftware.com/ en What is Unit Testing? Pros and cons of Unit Testing? https://tigosoftware.com/what-unit-testing-pros-and-cons-unit-testing <span class="field field--name-title field--type-string field--label-hidden">What is Unit Testing? Pros and cons of Unit Testing?</span> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><a title="View user profile." href="/user/1" lang="" about="/user/1" typeof="schema:Person" property="schema:name" datatype="" class="username">admin</a></span> <span class="field field--name-created field--type-created field--label-hidden">Fri, 05/26/2023 - 01:05</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>Unit testing is a type of atomic testing method that many people argue about.  Some think it’s necessary and useful, while others don’t like to use it unless they are forced to do so, for example: Unit Testing is a part of a bidding project.  </p> <p>Theoretically, Unit Testing is a good for health software application, but why many people resists it, despite the fact that the software industry is becoming more complex and doom to failure without any measure against the rot code.</p> <p><img alt="Safety net for source code" data-entity-type="file" data-entity-uuid="062cc6ac-4d17-45d4-8c66-07cc59643427" src="/sites/default/files/inline-images/unit_test_safety_net_0.png" /></p> <p><img alt="Benefits" src="https://tigosoftware.com/sites/default/files/inline-images/icon_tigo_benefits.png" /><strong><img alt="" src="http://103.121.91.113:2022/Uploads/icon_tigo_benefits.png" /><br /> Pros of Unit Testing</strong></p> <ul><li>Change your mindset into "failing tests" first. Think about imperfection before you are going for perfection.</li> <li>Changes for developer team to dig through the implicit requirements.</li> <li>Changes for developer team to simplify the business complexity.</li> <li><em>Tests</em> can <em>fail</em> intermittently for a number of reasons and identifying why they <em>fail</em> is often revealing about your codebase and environment.</li> </ul><p><strong><img alt="" src="http://103.121.91.113:2022/Uploads/icon_tigo_limitations.png" /></strong><img alt="Limitations" src="https://tigosoftware.com/sites/default/files/inline-images/icon_tigo_limitations.png" /><br /><strong>Cons of Unit Testing</strong></p> <ul><li>Unit Testing (UT), literally half-automation testing, requires a more complex environment and lots of effort to set up and tear down. If test coverage is not sufficient enough, the test quality is not up to par. It's like a medical prescription which requires a sufficient amount of taking drugs to cure the disease.</li> <li>UT requires having go/no-go decision points, otherwise useless.</li> <li>UT is not a part of the project lifecycle. If UT is a must-have choice, it’s highly recommended to experimental UTs for a set of critical test cases, i.e. edge test cases. For the system upgrades in future, the technical team will extend test case scope for the intensive processing.</li> <li>UT brings the increased risks and increased cost for the project. it will take time to build the testing environment for Unit Testing.</li> <li>UT is useful for the commercial systems having a large user base or high volume of transaction data.</li> <li>UT cannot prevent the objective from the “unknown unknown risk” so in the run, it’s necessary to initiate the annual maintenance plan to prevent unplanned failure.</li> <li>It isn't realistic -- or necessary -- to expect 100% code coverage through UT. The unit tests a development team creates depends on business needs and the application or applications' complexity.</li> <li>If your team has no proper framework for UT execution, it's better to set up an isolated UT system to execute periodically not just development/staging but also production environment. This will not affect the performance of the up-and-running Portal system. There are various commerce tools to develop UT projects.</li> </ul><p><em>Via <a href="https://en.tigosolutions.com/post/5659/what-is-unit-testing-pros-and-cons-of-unit-testing">TIGO Solutions</a></em></p> </div> <div class="field field--name-field-blog-category field--type-entity-reference field--label-inline clearfix"> <div class="field__label">Category</div> <div class="field__item"><a href="/category/thuat-ngu-phan-mem" hreflang="en">IT Glossary</a></div> </div> <div class="field field--name-field-tags field--type-entity-reference field--label-inline clearfix"> <h3 class="field__label inline">Tags</h3> <ul class="links field__items"> <li><a href="/taxonomy/term/105" hreflang="en">Testing</a></li> <li><a href="/taxonomy/term/675" hreflang="en">Software Best Practices</a></li> </ul> </div> <section class="field field--name-comment field--type-comment field--label-above comment-wrapper"> </section> Thu, 25 May 2023 18:05:29 +0000 admin 1662 at https://tigosoftware.com https://tigosoftware.com/what-unit-testing-pros-and-cons-unit-testing#comments