<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Azda Firmansyah on Medium]]></title>
        <description><![CDATA[Stories by Azda Firmansyah on Medium]]></description>
        <link>https://medium.com/@azdafirmansyah?source=rss-ef6ef8d68318------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Ejm6kSnWHvB_iOVn7m4CUw.png</url>
            <title>Stories by Azda Firmansyah on Medium</title>
            <link>https://medium.com/@azdafirmansyah?source=rss-ef6ef8d68318------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 10:36:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@azdafirmansyah/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Objective of Unit Test]]></title>
            <link>https://medium.com/@azdafirmansyah/objective-of-unit-test-22c80f18f080?source=rss-ef6ef8d68318------2</link>
            <guid isPermaLink="false">https://medium.com/p/22c80f18f080</guid>
            <category><![CDATA[unittest]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[quality-assurance]]></category>
            <dc:creator><![CDATA[Azda Firmansyah]]></dc:creator>
            <pubDate>Sat, 27 Jun 2020 05:12:47 GMT</pubDate>
            <atom:updated>2020-07-19T04:03:22.045Z</atom:updated>
            <content:encoded><![CDATA[<p>As developer, most of you face that unit test is mandatory. Sometimes at project you working on need requirement to cover more than 90% coverage even some of requirement need 100%(sound great right!!!👍).</p><p>It’s good to fulfil those requirement of unit test coverage but sometimes you need to refactoring your logic. Before you create your unit test, you write code to cover as many possibilities as possible of scenario to handling entire thing. After you create the unit test and test it out, the problem appear(sound familiar ?😃 ) maybe one of use case is not able to <strong>mock</strong> so unit test run like actual one. Well, to handling these thing you need to rewrite your logic even create another <strong><em>class</em></strong> and <strong><em>method</em></strong> to make your mocking work and test it again. It’s painful 😖. But the most important thing is your code just out of track from <em>KISS</em> principle (<a href="https://en.wikipedia.org/wiki/KISS_principle">https://en.wikipedia.org/wiki/KISS_principle</a>)</p><p>How many working hours you spent to write unit test ? I believe most of developer spent at least more than 60% of working hours compare with write actual code. What if developer spent time more than 60% ? still worth it?</p><p>We knew that unit test have a cost : maintain, time, and so forth. Unit test even more complex than actual code. When write some changes in actual code mean you need to modify your unit test as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/604/1*IgnLaC6thNY6gAdCLudGEQ.gif" /><figcaption><a href="https://www.colabug.com/2018/1019/5021795/">https://www.colabug.com/2018/1019/5021795/</a></figcaption></figure><p>Having unit test is good. But it doesn’t mean the most code coverage in your unit test make quality of your code is good. When you force your unit test to success and need to change the code to make it or the other way around you force logic in actual code to make unit test success it’s mean the objective of unit test is gone. Let developer do their part and let Quality Assurance do the rest.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22c80f18f080" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>