<!-- 
RSS generated by JIRA (1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d) at Thu Feb 08 23:07:09 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>FOLIO Jira</title>
    <link>https://folio-org.atlassian.net</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>1001.0.0-SNAPSHOT</version>
        <build-number>100246</build-number>
        <build-date>07-02-2024</build-date>
    </build-info>

<item>
            <title>[FOLIO-623] establish guidelines for API-level unit tests in FOLIO backend modules</title>
                <link>https://folio-org.atlassian.net/browse/FOLIO-623</link>
                <project id="10290" key="FOLIO">FOLIO</project>
                    <description>&lt;p&gt;We are lacking API coverage in some of the FOLIO backend/bl modules. To remedy the situation we&apos;d like to capture the guideline for writing those tests, including a list of technologies that should be used (e.g jUnit, RestAssured, any libraries for building mock services, etc).&lt;/p&gt;

&lt;p&gt;I think the guideline should eventually end up on dev.folio.org.&lt;/p&gt;

&lt;p&gt;With guidelines ready, we will create specific issues about implementing API-level tests for specific modules and services.&lt;/p&gt;</description>
                <environment></environment>
        <key id="79354">FOLIO-623</key>
            <summary>establish guidelines for API-level unit tests in FOLIO backend modules</summary>
                <type id="10002" iconUrl="https://folio-org.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10322?size=medium">New Feature</type>
                                            <priority id="10002" iconUrl="https://dev.folio.org/assets/jira-priority/jira-p3.svg">P3</priority>
                        <status id="1" iconUrl="https://folio-org.atlassian.net/images/icons/statuses/open.png" description="The issue is open and ready for the assignee to start work on it.">Open</status>
                    <statusCategory id="2" key="new" colorName="blue-gray"/>
                                    <resolution id="-1">Unresolved</resolution>
                                                        <assignee accountid="-1">Unassigned</assignee>
                                                                <reporter accountid="557058:b8e64633-1f7c-402d-9caf-9959a5ba5d0d">Jakub Skoczen</reporter>
                                    <labels>
                            <label>ci</label>
                            <label>cicd</label>
                            <label>for-next-sprint</label>
                            <label>sprint14</label>
                            <label>sprint15</label>
                    </labels>
                <created>Wed, 24 May 2017 14:02:32 +0000</created>
                <updated>Tue, 15 Jan 2019 11:53:54 +0000</updated>
                                                                                <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                <comments>
                                                            <comment id="190719" author="5f9abc1eb45b2e007453f423" created="Wed, 24 May 2017 17:38:02 +0000"  >&lt;p&gt;REST Assured (&lt;a href=&quot;http://rest-assured.io/&quot; class=&quot;external-link&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://rest-assured.io/&lt;/a&gt;)  seems fairly straight-forward and simple to use.&lt;/p&gt;</comment>
                                                            <comment id="190724" author="63e2a2771b13d42998e4e706" created="Tue, 6 Jun 2017 10:36:54 +0000"  >&lt;p&gt;I&apos;ll have a go at reflecting what mod-circulation and mod-inventory currently do (or will at the next release, as some of this has evolved recently). I&apos;m not proposing that this is adopted directly, it is more for context of what we already have in places.&lt;/p&gt;

&lt;p&gt;It is possible to significantly refine this, for example, we might want to alter this so that the tests don&apos;t start the module at all (in the context of a integrated CI environment).&lt;/p&gt;

&lt;p&gt;The approach these modules have taken is to have a suite of API tests which by default use fake implementations of the interfaces they are dependent upon, so they can be run standalone.&lt;/p&gt;

&lt;p&gt;These tests can be configured (using system properties which the test suite picks up on) to use: &lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Okapi proxied implementations of these dependent interfaces (so as to ensure the fakes are sufficiently close to the real implementations)&lt;/li&gt;
	&lt;li&gt;And to additionally make the initial requests to the module being tested via Okapi (so as to ensure that registration works)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;To support these configurations, there are two scripts, they follow roughly the same sequence:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Create a tenant&lt;/li&gt;
	&lt;li&gt;Activate the dependent modules (the dependency has to become an implementation at the point)&lt;/li&gt;
	&lt;li&gt;Optionally register and activate the module being tested (for initial requests to be proxied)&lt;/li&gt;
	&lt;li&gt;Execute the tests&lt;/li&gt;
	&lt;li&gt;Optionally deactivate and unregister the module being tested&lt;/li&gt;
	&lt;li&gt;Deactivate the dependent modules&lt;/li&gt;
	&lt;li&gt;Remove the tenant&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;As deactivation no longer triggers the Tenant API to remove the data storage, removing this is provided as a separate set of scripts to be run as needed.&lt;/p&gt;

&lt;p&gt;When testing requests that are proxied through Okapi, it isn&apos;t possible to use the auth filters at the moment (as the tests cannot replace the auth key they use at the moment).&lt;/p&gt;</comment>
                                                            <comment id="190730" author="712020:38d1a08f-86a8-4df2-9191-239b16b0a81a" created="Thu, 8 Jun 2017 12:28:42 +0000"  >&lt;p&gt;Okapi has a fairly extensive set of unit tests, see for example ModuleTest.java under Okapi&apos;s source tree. Uses RestAssured. One thing where Okapi differs is that it can run with an in-memory database that always starts with a well-defined (nearly) empty database. &lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10000" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummarycf">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10057" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Development Team</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10144"><![CDATA[Core: Platform]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10019" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|hzxofr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10020" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10024" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>[CHART] Date of First Response</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 24 May 2017 17:38:02 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                </customfields>
    </item>
</channel>
</rss>