<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How should I test my REST API? in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-should-I-test-my-REST-API/m-p/76090#M47503</link>
    <description>&lt;P&gt;Yes, ideally you should test every endpoint. And, yes, your tests should my tests include a database connection. You should check every point where an error might occur.&lt;BR /&gt;&lt;BR /&gt;If you cannot do this at the moment, you can look for a freelance specialist to help you customize your tests. &lt;A href="Https://cashloansnearby.com/ohio/dayton/" target="_blank"&gt;Https://cashloansnearby.com/ohio/dayton/&lt;/A&gt; has addresses of payday loans and cash loans in Ohio so you can pay for a specialist consultation without any hassle&lt;/P&gt;</description>
    <pubDate>Sat, 01 May 2021 10:34:42 GMT</pubDate>
    <dc:creator>LissieS</dc:creator>
    <dc:date>2021-05-01T10:34:42Z</dc:date>
    <item>
      <title>How should I test my REST API?</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-should-I-test-my-REST-API/m-p/75922#M47391</link>
      <description>&lt;DIV class="_3xX726aBn29LDbsDtzr_6E _1Ap4F5maDtT1E1YuCiaO0r D3IL3FD0RFy_mkKLPwL4"&gt;&lt;DIV class="_292iotee39Lmt0MkQZ2hPV RichTextJSON-root"&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;I couldn't find the answer to the questions I'm going to ask. Let's say I'm developing a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;REST API&lt;/STRONG&gt;.&lt;/P&gt;&lt;UL class="_33MEMislY0GAlB78wL1_CR"&gt;&lt;LI&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;Should I test every endpoint?&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;Every endpoint interacts with the database. Should my tests include a database connection?&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;Where do&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;unit tests&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;fit in a REST API, apart from request validation?&lt;/P&gt;&lt;UL class="_33MEMislY0GAlB78wL1_CR"&gt;&lt;LI&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;Every controller call goes like this:&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;OL class="_1eJr7K139jnMstd4HajqYP"&gt;&lt;LI&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;Receive request &amp;lt;-- here, I see I could have unit tests for validating request body and HTTP headers&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;Process &amp;lt;-- here, no matter how deep this level can go, there's going to be interaction with the database, so any test here would mean&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;integration&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;test&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;Return response&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;UL class="_33MEMislY0GAlB78wL1_CR"&gt;&lt;LI&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;Considering the above for every call, how can there be unit tests apart from validating request? When there's database / external service interaction in the test, it's an&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;integration&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;test, right? So I don't see where else could there be unit tests.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 22 Apr 2021 17:45:54 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-should-I-test-my-REST-API/m-p/75922#M47391</guid>
      <dc:creator>JimmyAndreson</dc:creator>
      <dc:date>2021-04-22T17:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: How should I test my REST API?</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-should-I-test-my-REST-API/m-p/76090#M47503</link>
      <description>&lt;P&gt;Yes, ideally you should test every endpoint. And, yes, your tests should my tests include a database connection. You should check every point where an error might occur.&lt;BR /&gt;&lt;BR /&gt;If you cannot do this at the moment, you can look for a freelance specialist to help you customize your tests. &lt;A href="Https://cashloansnearby.com/ohio/dayton/" target="_blank"&gt;Https://cashloansnearby.com/ohio/dayton/&lt;/A&gt; has addresses of payday loans and cash loans in Ohio so you can pay for a specialist consultation without any hassle&lt;/P&gt;</description>
      <pubDate>Sat, 01 May 2021 10:34:42 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-should-I-test-my-REST-API/m-p/76090#M47503</guid>
      <dc:creator>LissieS</dc:creator>
      <dc:date>2021-05-01T10:34:42Z</dc:date>
    </item>
  </channel>
</rss>

