{"id":887,"date":"2019-03-20T14:10:48","date_gmt":"2019-03-20T14:10:48","guid":{"rendered":"https:\/\/djangostars.com\/blog\/?p=887"},"modified":"2024-11-26T08:59:07","modified_gmt":"2024-11-26T08:59:07","slug":"testing-third-party-integration-using-mock-data","status":"publish","type":"post","link":"https:\/\/djangostars.com\/blog\/testing-third-party-integration-using-mock-data\/","title":{"rendered":"Testing Third-Party Integration Using Mock Data"},"content":{"rendered":"<p>We\u2019ve all long since gotten used to third-party services within apps and platforms we use on a daily basis, and we don\u2019t even notice them. Through an API, third-party services can be integrated with any other service to add a larger set of functions \u2013 like logging into cooking websites with Facebook, or getting bank information to get an online mortgage. These truly can be used in everything from entertainment to fintech. Fintech, by the way, is what we would like to talk about in the first place, considering how much we have worked in the financial field. We\u2019ve gathered one or two useful bits of info over the years.<br \/>\n<img decoding=\"async\" class=\"alignnone size-full wp-image-893\" src=\"https:\/\/djangostars.com\/blog\/wp-content\/uploads\/2019\/03\/IMG_1_1-1.png\" alt=\" 3rd-side services integration\" width=\"1794\" height=\"895\" \/><br \/>\nAs we\u2019ve said, third-party services guarantee extended functionality and flawless functioning without overburdening the main product and making it too complicated. It\u2019s safe to say that these are supporting services. They help major services check the data provided by users and their reliability. In fintech, it can be banks or other institutions that carry information about private persons or legal bodies, exchange-rate data used in e-commerce, or money transfers.<\/p>\n<p>This article will show you how to provide testing of 3rd party integration services for your product. But if you have problems with the project and you suspect that it\u2019s all about 3rd party services, and you do not know how to fix them, you can <a href=\"https:\/\/djangostars.com\/get-in-touch\/\">contact us<\/a> for additional advice.<br \/>\n<div class=\"article-linking \">\n    <div class=\"article-linking-background\" style=\"background-image: url(https:\/\/djangostars.com\/blog\/wp-content\/uploads\/2019\/05\/8_bg.png)\">\n\n    <\/div>\n    <div class=\"article-linking-content \">\n        <img decoding=\"async\" src=\"https:\/\/djangostars.com\/blog\/wp-content\/themes\/ds-new-blog\/assets\/img\/ds-logo-white.svg\" alt=\"logo\" class=\"article-linking-logo\">\n        <h3 class=\"article-linking-caption\">\n\t\t\tMake sure your product is <u>perfect.<\/u>\t\t\t                <p class=\"article-linking-caption--small\">\n                    Hire an experienced QA team.                <\/p>\n                    <\/h3>\n\t\t            <div class=\"article-link-wrapper\">\n                <a href=\"https:\/\/djangostars.com\/services\/#quality-assurance\" target=\"_blank\">Learn more<\/a>\n            <\/div>\n\t\t    <\/div>\n<\/div>\n<\/p>\n<h2 id=\"header1\">Third-Party Services: A Short Guide<\/h2>\n<p>Before we tell you about testing of 3rd integration APIs, let\u2019s look at how these services work. For instance, we have a mortgage platform. Users register by providing their personal data \u2013 name and surname, date of birth, income, and other relevant information. The platform sends a request to the third-party service it\u2019s integrated with to confirm the data it\u2019s received. The third-party service \u2013 in this case, it might be a bank \u2013 has information about the user such as their credit history, possibly their criminal record, etc., and provides it to the platform. Here, we see how the third-party service helps the platform recognize imposters or simply provide a better mortgage estimate to a particular user.<\/p>\n<p>At the same time, all this data doesn\u2019t have to be stored on the platform. You store only the data you\u2019ve requested. But at the same time, you have a large pool of data for further searches if you need it. <strong>This is why they\u2019re called third-party services \u2013 they are the third side of your client-service relationship.<\/strong><br \/>\n<img decoding=\"async\" class=\"alignnone size-full wp-image-892\" src=\"https:\/\/djangostars.com\/blog\/wp-content\/uploads\/2019\/03\/IMG_2-16.png\" alt=\"3rd-side services in Fintech\" width=\"1542\" height=\"916\" \/><\/p>\n<h2 id=\"header2\">Testing Third-Party Service Integration<\/h2>\n<p>Before we connect our platform to a <a href=\"https:\/\/djangostars.com\/blog\/3rd-party-api-fintech-mortgage-apps\/\" rel=\"nofollow\">third-party API<\/a>, we need to see if it plays well with whatever service we\u2019re providing. We need to make sure they understand each other well, and data is represented adequately. But if it\u2019s a third-party service, why do <i>we<\/i> need to test 3rd party API?<\/p>\n<h3 id=\"header3\">Testing Data Interpretation<\/h3>\n<p>What we really have to test is the integration of the third-party service, or rather the data we get from it. Since we\u2019re going to use it with our own product, we don\u2019t want it to mess up our business. Most importantly, <strong>we should test whether the data is interpreted correctly and whether it\u2019s being adequately processed.<\/strong> We need to be sure that the data is being converted to the necessary format and correctly delivered \u2013 for instance, if the amount that represents income is shown in the income field, or the calculation run correctly.<\/p>\n<p>It can get especially tricky when it comes to fintech products, as the services have to deal with a lot of numbers. You don\u2019t want your product to mix up someone\u2019s income with an outstanding debt. The whole product and the result of its work depends on the interpretation of data. And this is why testing of the third-party services is so important.<\/p>\n<h3 id=\"header4\">Lacks of Standard Testing<\/h3>\n<p>Okay, we\u2019ve established the importance of third-party integration service testing. But how do we do it? For once, banks, agencies, tax offices and most other financial institutions have already taken care of it. For an extra fee, they can test their services with yours and provide you with the test results.<\/p>\n<p>At this point, you may think that there\u2019s no use in continuing reading this article, right? After all, you can just buy the test results and call it quits. It\u2019s cheap, and less cumbersome.<\/p>\n<p>But the problem is that <strong>third-party services can only give you standard testing data.<\/strong> They\u2019re obviously not diverse enough to answer to all the potential search queries. There can be billions of them, but third-party services can\u2019t even give you a couple of hundred.<\/p>\n<blockquote><p>They love to keep it simple. For instance, test data shows you that if you look for a condo under $700, the third-party service will show you a corresponding list of possibilities. But what if you look for something more exotic, like a bungalow? And if the prices are between $600 and $2000? The third-party service doesn\u2019t include variables like these in their results. What we get is a standard accommodation type at an average price, and that\u2019s it. They\u2019re not configurable. We can\u2019t manipulate them in any way. And this is obviously not enough to test a product.<\/p><\/blockquote>\n<h3 id=\"header5\">The Pitfalls of Taking Integration Testing Into Your Own Hands<\/h3>\n<p>At this point, it\u2019s clear that we have to test the service using our own resources. There\u2019s just no use in spending money on the test data that third-party services offer. <strong>It\u2019s easier to create a test on our own, so we can add any data we want and manipulate it in a way that suits us.<\/strong> This way, we can cover all kinds of enquiries, like price range, type of property, average market price for rent or exchange rate, and so on.<\/p>\n<p>To test how well your product is integrated with the third-party service, you can input different data and see whether the third-party service provides a correct response (or if your product correctly interprets the service\u2019s response). However, this doesn\u2019t resolve the problem of every enquiry being costly. The truth is, <strong>using third-party data is quite expensive<\/strong>, as every request sent to them costs a certain amount of money. And you can only imagine how many enquiries you have to send to test all the possible answers you might get from the service!<\/p>\n<p>As you can see, testing may be the most expensive part of the product. So, how do you test your product in a way that allows you to manipulate input data, but without paying all the money in the world?<\/p>\n<h2 id=\"header6\">The Solution to the Testing Problem<\/h2>\n<p>Worry not! There is indeed a way to get the test data you need instead of the average results you\u2019ll get from a third-party service. Try a mock service \u2013 an imitation of a third-party service. So, it basically looks like a duck, quacks like a duck, but isn\u2019t the actual duck. <a href=\"https:\/\/docs.atlassian.com\/atlassian-confluence\/REST\/6.6.0\/\" rel=\"nofollow\">Confluence<\/a>, for instance, has an API that stores \u201cfake\u201d data . We use a mock service that our own backend developers wrote for us and enter our data manually. The data you get from the mock is saved in a <i>json<\/i> file. For instance, Screen 1 shows data about a certain user, while Screen 2 shows potential data on a building, like in the example above.<br \/>\n<img decoding=\"async\" class=\"alignnone size-full wp-image-901\" src=\"https:\/\/djangostars.com\/blog\/wp-content\/uploads\/2019\/03\/IMG_3_1-2.png\" alt=\"Mocked data for testing 3rd-side service\" width=\"1136\" height=\"1168\" \/><img decoding=\"async\" class=\"alignnone size-full wp-image-902\" src=\"https:\/\/djangostars.com\/blog\/wp-content\/uploads\/2019\/03\/IMG_4_1.png\" alt=\"Mocked data for testing 3rd-side service\" width=\"1136\" height=\"1168\" \/><br \/>\nThe method of testing integration using mock data has pros and cons.<br \/>\n<strong>Pros:<\/strong><\/p>\n<ul>\n<li>Data variability, as opposed to standard test data.<\/li>\n<li>Independence from third parties \u2013 you can\u2019t test services connected with banks outside of their opening hours.<\/li>\n<li>A greater number of possible test scenarios.<\/li>\n<li>Less dependency on testers from developers<\/li>\n<\/ul>\n<p><strong>Cons:<\/strong><\/p>\n<ul>\n<li>Artificial environment \u2013 hard to predict all of the possible situations that may arise in real life; higher chances of missing something.<\/li>\n<li>Pesticide paradox \u2013 by using the same tests and same data again and again, developers won\u2019t be able to recover bugs, and using new data every time is too cumbersome.<\/li>\n<li>500 error \u2013 when entering data that aren\u2019t in the mock service, developers will get errors, as it\u2019s rather hard to create all possible answers manually.<\/li>\n<li>Database maintenance \u2013 maintaining your own database gets harder as the database grows.<\/li>\n<\/ul>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-889\" src=\"https:\/\/djangostars.com\/blog\/wp-content\/uploads\/2019\/03\/IMG_5-12.png\" alt=\"Mocked data for testing 3rd-side service\" width=\"1542\" height=\"939\" \/><\/p>\n<h2 id=\"header7\">Make Your Own<\/h2>\n<p>To create your own mock integration test for 3rd party API, create a new development environment. Then, install libraries. A <i>mock<\/i> library \u2013 it will replace parts of your system with mock objects. The <i>nose<\/i> library will make the testing easier. The <i>request<\/i> libraries will significantly simplify HTTP calls.<\/p>\n<p>Before beginning the tests, be sure to know what to expect from your fake API. First and foremost, the API you\u2019re working with should properly respond when you send it a request. Also, check the structure of the data in the response. Your next assumption is that you will know what the expected data will look like. At this point, you see that the API endpoint is functioning well.<\/p>\n<p>You can write a <i>nose<\/i> test to confirm the server\u2019s future life and see if the server returns an OK response. Now, run the test and see how it works.<br \/>\n<img decoding=\"async\" class=\"alignnone size-full wp-image-888\" src=\"https:\/\/djangostars.com\/blog\/wp-content\/uploads\/2019\/03\/IMG_6-11.png\" alt=\"Mocked data for testing 3rd-side service\" width=\"1600\" height=\"1733\" \/><\/p>\n<h2 id=\"header8\">Testing Tips<\/h2>\n<p>As you see, there is a way out of the dead end that is efficient and cost-effective. You don\u2019t have to settle for cheap standard tests that don\u2019t help much, and you don\u2019t have to waste money on costly tests that use third-party data for every test inquiry. As soon as you go through a couple of test runs and get a hold of how it goes. However, we still have a couple of recommendations you should consider when you use mock data for testing third-party services.<\/p>\n<ul>\n<li><strong>Use a separate server for this data<\/strong>, so you can only reach out to your mock data and it doesn\u2019t get mixed up with real data. Running tests with a separate server will also save your users\u2019 data from any possible corruption or security breaches.<\/li>\n<li>When setting up the service, <strong>make sure it always responds to the server it usually works with.<\/strong> For instance, synchronize their deployment. If you introduce changes to the mock server, dev.mock, the third-party server, dev, should be getting the same updates. Otherwise, it won\u2019t be possible to test the way the data is transferred and interpreted.<\/li>\n<li><strong>Take into account variables like languages, browsers, and environments.<\/strong> To do so, know your users. Think like they do. What gadgets do they use, what languages do they speak, what money do they pay with? Leaving out even one tiny detail may make your test results unusable.<\/li>\n<\/ul>\n<p>It\u2019s no wonder that they say, \u201cIf you want something done right, do it yourself.\u201d Of course, third-party services can make your life and your platform\u2019s work easier, but only if <i>you<\/i> as the product owner use them correctly. This is also true when it comes to testing third-party integration. There\u2019s no way around this step, so it\u2019s crucial to find the most efficient way to do it. In some cases, maybe even buying test results from the service itself will suffice. But by doing the testing yourself, you can be confident in the results you get. Using mock data enables you to get the most realistic test results, as it gives you more freedom and more variables than standard test data from a service. Either way, now you know how to test third-party API and have several options. So choose wisely!<\/p>\n<p>By the way, choosing a software vendor for your project is less complicated &#8211; just <b>get in touch with the Django Stars team<\/b>.<br \/>\n<div class=\"lead-form-wrapper lets_disqus\">\n    <div class=\"lead-form transparent-footer\">\n        <p class=\"discuss-title paragraph-discuss col-md-12\">Have an idea? Let&#039;s discuss!<\/p>\n\n        \n<div class=\"wpcf7 no-js\" id=\"wpcf7-f2589-o1\" lang=\"en-US\" dir=\"ltr\" data-wpcf7-id=\"2589\">\n<div class=\"screen-reader-response\"><p role=\"status\" aria-live=\"polite\" aria-atomic=\"true\"><\/p> <ul><\/ul><\/div>\n<form action=\"\/blog\/wp-json\/wp\/v2\/posts\/887#wpcf7-f2589-o1\" method=\"post\" class=\"wpcf7-form init\" aria-label=\"Contact form\" enctype=\"multipart\/form-data\" novalidate=\"novalidate\" data-status=\"init\">\n<div style=\"display: none;\">\n<input type=\"hidden\" name=\"_wpcf7\" value=\"2589\" \/>\n<input type=\"hidden\" name=\"_wpcf7_version\" value=\"6.0.6\" \/>\n<input type=\"hidden\" name=\"_wpcf7_locale\" value=\"en_US\" \/>\n<input type=\"hidden\" name=\"_wpcf7_unit_tag\" value=\"wpcf7-f2589-o1\" \/>\n<input type=\"hidden\" name=\"_wpcf7_container_post\" value=\"0\" \/>\n<input type=\"hidden\" name=\"_wpcf7_posted_data_hash\" value=\"\" \/>\n<input type=\"hidden\" name=\"form_start_time\" value=\"1776763107\" \/>\n<input type=\"hidden\" name=\"_wpcf7_recaptcha_response\" value=\"\" \/>\n<\/div>\n<div class=\"form_holder\">\n    <div class=\"input_section input_row\">\n        <div class=\"input_holder\">\n                            <span class=\"input_label\">\n                               Your name *\n                            <\/span>\n            <input size=\"40\" maxlength=\"400\" class=\"wpcf7-form-control wpcf7-text wpcf7-validates-as-required\" id=\"your-name\" aria-required=\"true\" aria-invalid=\"false\" value=\"\" type=\"text\" name=\"text-898\" \/>\n\n            <input class=\"wpcf7-form-control wpcf7-hidden\" id=\"uniq_ga_id\" value=\"\" type=\"hidden\" name=\"uniq_ga_id\" \/>\n        <\/div>\n        <div class=\"input_holder\">\n                            <span class=\"input_label\">\n                                Your email *\n                            <\/span>\n            <input size=\"40\" maxlength=\"400\" class=\"wpcf7-form-control wpcf7-email wpcf7-validates-as-required wpcf7-text wpcf7-validates-as-email\" id=\"your-email\" aria-required=\"true\" aria-invalid=\"false\" value=\"\" type=\"email\" name=\"email-882\" \/>\n        <\/div>\n    <\/div>\n    <div class=\"input_section single_input_row\">\n        <div class=\"input_holder\">\n            <span class=\"input_label\">How can we help you? *<\/span>\n            <input size=\"40\" maxlength=\"400\" class=\"wpcf7-form-control wpcf7-text\" id=\"message\" aria-invalid=\"false\" value=\"\" type=\"text\" name=\"message\" \/>\n        <\/div>\n    <\/div>\n    <div class=\"file_attach\">\n        <input size=\"40\" class=\"wpcf7-form-control wpcf7-file\" accept=\"audio\/*,video\/*,image\/*\" aria-invalid=\"false\" type=\"file\" name=\"file-930\" \/>\n        <div class=\"file_placeholder\">\ud83d\udcce <span>Attach File<\/span>\n            <span class=\"file_formats\">Formats: pdf, doc, docx, rtf, ppt, pptx.<\/span><\/div>\n    <\/div>\n    <div class=\"checkbox_row\">\n        <div class=\"single_checkbox\"><div class=\"checkbox_indicator\"><div class=\"checked_indicator\"><svg width=\"14\" height=\"12\" viewBox=\"0 0 14 12\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M4.66804 12L0 7.26951L1.22426 6.05269L4.54927 9.40456L12.6737 0L14 1.10613L4.66804 12Z\" fill=\"#1E232C\"\/><\/svg><\/div><\/div><input type=\"checkbox\" name=\"agree\" id=\"privacy\" value=\"agree privacy\"><label for=\"privacy\" class=\"\">I have read and accepted <a href=\"https:\/\/djangostars.com\/privacy-policy\/\" style=\"margin-left: 6px;\"> Privacy Policy*<\/a><\/label><\/div>\n        <div class=\"single_checkbox\"><div class=\"checkbox_indicator\"><div class=\"checked_indicator\"><svg width=\"14\" height=\"12\" viewBox=\"0 0 14 12\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M4.66804 12L0 7.26951L1.22426 6.05269L4.54927 9.40456L12.6737 0L14 1.10613L4.66804 12Z\" fill=\"#1E232C\"\/><\/svg><\/div><\/div><input type=\"checkbox\" name=\"agree\" id=\"marketing\" value=\"agree for marketing\"><label for=\"marketing\" class=\"\">I agree to receive marketing content from Django Stars<\/label><\/div>\n    <\/div>\n    <div class=\"submit\"><button type=\"submit\"><span>send message<\/span><\/button><div class=\"safeguard\">We safeguard your privacy<\/div><\/div>\n<\/div>\n<div style=\"position: absolute; left: -5000px;\" aria-hidden=\"true\">\n    <input size=\"40\" maxlength=\"400\" class=\"wpcf7-form-control wpcf7-text\" aria-invalid=\"false\" value=\"\" type=\"text\" name=\"website_url\" \/>\n<\/div><script type='text\/javascript'>\n\n\t\t\t\t\t\tif(contactform === undefined){\n\t\t\t\t\t\t\tvar contactform = [];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar innerVal = [2589,'mail_sent_ok','Thank you for your message. It has been sent.'];\n\t\t\t\t\t\tcontactform.push(innerVal);\n\t\t\t\t\t\tvar innerVal = [2589,'mail_sent_ng','There was an error trying to send your message. Please try again later.'];\n\t\t\t\t\t\tcontactform.push(innerVal);\n\t\t\t\t\t\tvar innerVal = [2589,'validation_error','One or more fields have an error. Please check and try again.'];\n\t\t\t\t\t\tcontactform.push(innerVal);\n\t\t\t\t\t\tvar innerVal = [2589,'spam','There was an error trying to send your message. Please try again later.'];\n\t\t\t\t\t\tcontactform.push(innerVal);\n\t\t\t\t\t\tvar innerVal = [2589,'accept_terms','You must accept the terms and conditions before sending your message.'];\n\t\t\t\t\t\tcontactform.push(innerVal);\n\t\t\t\t\t\tvar innerVal = [2589,'invalid_required','The field is required.'];\n\t\t\t\t\t\tcontactform.push(innerVal);\n\t\t\t\t\t\tvar innerVal = [2589,'invalid_too_long','The field is too long.'];\n\t\t\t\t\t\tcontactform.push(innerVal);\n\t\t\t\t\t\tvar innerVal = [2589,'invalid_too_short','The field is too short.'];\n\t\t\t\t\t\tcontactform.push(innerVal);\n\t\t\t\t\t\tvar innerVal = [2589,'upload_failed','There was an unknown error uploading the file.'];\n\t\t\t\t\t\tcontactform.push(innerVal);\n\t\t\t\t\t\tvar innerVal = [2589,'upload_file_type_invalid','You are not allowed to upload files of this type.'];\n\t\t\t\t\t\tcontactform.push(innerVal);\n\t\t\t\t\t\tvar innerVal = [2589,'upload_file_too_large','The file is too big.'];\n\t\t\t\t\t\tcontactform.push(innerVal);\n\t\t\t\t\t\tvar innerVal = [2589,'upload_failed_php_error','There was an error uploading the file.'];\n\t\t\t\t\t\tcontactform.push(innerVal);\n\t\t\t\t\t\tvar innerVal = [2589,'invalid_date','The date format is incorrect.'];\n\t\t\t\t\t\tcontactform.push(innerVal);\n\t\t\t\t\t\tvar innerVal = [2589,'date_too_early','The date is before the earliest one allowed.'];\n\t\t\t\t\t\tcontactform.push(innerVal);\n\t\t\t\t\t\tvar innerVal = [2589,'date_too_late','The date is after the latest one allowed.'];\n\t\t\t\t\t\tcontactform.push(innerVal);\n\t\t\t\t\t\tvar innerVal = [2589,'invalid_number','The number format is invalid.'];\n\t\t\t\t\t\tcontactform.push(innerVal);\n\t\t\t\t\t\tvar innerVal = [2589,'number_too_small','The number is smaller than the minimum allowed.'];\n\t\t\t\t\t\tcontactform.push(innerVal);\n\t\t\t\t\t\tvar innerVal = [2589,'number_too_large','The number is larger than the maximum allowed.'];\n\t\t\t\t\t\tcontactform.push(innerVal);\n\t\t\t\t\t\tvar innerVal = [2589,'quiz_answer_not_correct','The answer to the quiz is incorrect.'];\n\t\t\t\t\t\tcontactform.push(innerVal);\n\t\t\t\t\t\tvar innerVal = [2589,'invalid_email','The e-mail address entered is invalid.'];\n\t\t\t\t\t\tcontactform.push(innerVal);\n\t\t\t\t\t\tvar innerVal = [2589,'invalid_url','The URL is invalid.'];\n\t\t\t\t\t\tcontactform.push(innerVal);\n\t\t\t\t\t\tvar innerVal = [2589,'invalid_tel','The telephone number is invalid.'];\n\t\t\t\t\t\tcontactform.push(innerVal);\n\t\t\t\t\t\tvar innerVal = [2589,'gdpr',''];\n\t\t\t\t\t\tcontactform.push(innerVal);\n\t\t\t\t\t\t<\/script><div class=\"wpcf7-response-output\" aria-hidden=\"true\"><\/div>\n<\/form>\n<\/div>\n    <\/div>\n\n    <div class=\"success_disqus\">\n        Thank you for your message.\n        <span>We\u2019ll contact you shortly<\/span>.\n    <\/div>\n<\/div>\n\n<script>\n    \/\/ (function ($) {\n    function click_input() {\n        jQuery('.file_placeholder').on('click', function () {\n            jQuery(this).parent().find('input').click();\n        })\n    }\n\n    document.addEventListener(\"DOMContentLoaded\", click_input);\n\n    \/\/ })(jQuery)\n<\/script>\n\n\n<br \/>\n<div class=\"dj-main-article-faq\" style=\"padding-top: 0px;\">\n\t\t<div class=\"dj-main-article-faq-title\">\n\t\tFrequently Asked Questions\n\t\t<\/div>\n\t\t<div class=\"dj-main-article-faq-items\">\n\t\t\t<div class=\"dj-main-article-faq-accordeon accordeon\"><dl>\n\t\t\t\t<dt>How to test third-party API integration in Django? \n\t\t\t\t<div class=\"cross\">\n\t\t\t\t<span><\/span>\n\t\t\t\t<span><\/span>\n\t\t\t\t<\/div>\n\t\t\t\t<\/dt>\n\t\t\t\t<dd>For an extra fee, third-party service provisers can test their services with yours and provide you with the test results. But the problem is that third-party services can only give you standard testing data. Thus, it\u2019s easier to create a test on our own, so you can add any data you want and manipulate it in a way that suits you. <\/dd>\n\t\t\t<\/dl><dl>\n\t\t\t\t<dt>What testing method should I use to test a 3rd party API? \n\t\t\t\t<div class=\"cross\">\n\t\t\t\t<span><\/span>\n\t\t\t\t<span><\/span>\n\t\t\t\t<\/div>\n\t\t\t\t<\/dt>\n\t\t\t\t<dd>To get the test data you need instead of the average results you\u2019ll get from a third-party service, try a mock service \u2013 an imitation of a third-party service. <\/dd>\n\t\t\t<\/dl><dl>\n\t\t\t\t<dt>Does Django Stars have experience in integrating 3rd APIs on Django? \n\t\t\t\t<div class=\"cross\">\n\t\t\t\t<span><\/span>\n\t\t\t\t<span><\/span>\n\t\t\t\t<\/div>\n\t\t\t\t<\/dt>\n\t\t\t\t<dd>Our developers have extensive experience integrating and testing third-party services on Django projects. If you have difficulty integrating 3rd party services into your project and need additional advice, contact the Django Stars team.<\/dd>\n\t\t\t<\/dl><dl>\n\t\t\t\t<dt>What are the must-have third-party integrations for the Django projects? \n\t\t\t\t<div class=\"cross\">\n\t\t\t\t<span><\/span>\n\t\t\t\t<span><\/span>\n\t\t\t\t<\/div>\n\t\t\t\t<\/dt>\n\t\t\t\t<dd>Third-party services guarantee extended functionality and flawless functioning without overburdening the main product and making it too complicated. It\u2019s safe to say that these are supporting services. They help major services check the data provided by users and their reliability. The need for third-party services depends on your project. In fintech, it can be banks, agencies, tax offices, or other institutions that carry information about private persons or legal bodies, exchange-rate data used in e-commerce, or money transfers.<\/dd>\n\t\t\t<\/dl><\/div>\n\t\t\t<\/div>\n\t\t<\/div><\/p>\n<div id=\"chromeExtensionIsInstalled\" style=\"display: none;\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>We\u2019ve all long since gotten used to third-party services within apps and platforms we use on a daily basis, and we don\u2019t even notice them. Through an API, third-party services can be integrated with any other service to add a larger set of functions \u2013 like logging into cooking websites with Facebook, or getting bank [&hellip;]<\/p>\n","protected":false},"author":29,"featured_media":3546,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[44,70],"tags":[28,24],"class_list":["post-887","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python-django","category-qa","tag-api","tag-quality-assurance"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Software Development Blog &amp; IT Tech Insights | Django Stars<\/title>\n<meta name=\"description\" content=\"Using third-party services can be risky. Test your product&#039;s integration with mock data instead of standard tests to ensure smoother and more dependable results.\" \/>\n<link rel=\"canonical\" href=\"https:\/\/djangostars.com\/blog\/wp-json\/wp\/v2\/posts\/887\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Testing Third-Party Integration Using Mock Data\" \/>\n<meta property=\"og:description\" content=\"Using third-party services may be risky, if you\u2019re not confident in what you\u2019re using. Test how well your product is integrated with a third-party service by using mock data instead of standard tests.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/djangostars.com\/blog\/testing-third-party-integration-using-mock-data\/\" \/>\n<meta property=\"og:site_name\" content=\"Software Development Blog &amp; IT Tech Insights | Django Stars\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/djangostars\/\" \/>\n<meta property=\"article:published_time\" content=\"2019-03-20T14:10:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-26T08:59:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/djangostars.com\/blog\/uploads\/2019\/03\/cover-15.png\" \/>\n<meta name=\"author\" content=\"Serhii Bolilyi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"Testing Third-Party Integration Using Mock Data\" \/>\n<meta name=\"twitter:description\" content=\"Using third-party services may be risky, if you\u2019re not confident in what you\u2019re using. Test how well your product is integrated with a third-party service by using mock data instead of standard tests.\" \/>\n<meta name=\"twitter:creator\" content=\"@djangostars\" \/>\n<meta name=\"twitter:site\" content=\"@djangostars\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Serhii Bolilyi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/djangostars.com\/blog\/testing-third-party-integration-using-mock-data\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/djangostars.com\/blog\/testing-third-party-integration-using-mock-data\/\"},\"author\":{\"name\":\"Serhii Bolilyi\",\"@id\":\"https:\/\/djangostars.com\/blog\/#\/schema\/person\/183a654c18587fc734d2e649ae17dfea\"},\"headline\":\"Testing Third-Party Integration Using Mock Data\",\"datePublished\":\"2019-03-20T14:10:48+00:00\",\"dateModified\":\"2024-11-26T08:59:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/djangostars.com\/blog\/testing-third-party-integration-using-mock-data\/\"},\"wordCount\":1990,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/djangostars.com\/blog\/testing-third-party-integration-using-mock-data\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/djangostars.com\/blog\/wp-content\/uploads\/2021\/12\/Testing-Third-Party-Integration-Using-Mock-Data.jpg\",\"keywords\":[\"API\",\"Testing\"],\"articleSection\":[\"Python &amp; Django\",\"QA\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/djangostars.com\/blog\/testing-third-party-integration-using-mock-data\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/djangostars.com\/blog\/testing-third-party-integration-using-mock-data\/\",\"url\":\"https:\/\/djangostars.com\/blog\/testing-third-party-integration-using-mock-data\/\",\"name\":\"Testing Third-Party Integration Using Mock Data\",\"isPartOf\":{\"@id\":\"https:\/\/djangostars.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/djangostars.com\/blog\/testing-third-party-integration-using-mock-data\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/djangostars.com\/blog\/testing-third-party-integration-using-mock-data\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/djangostars.com\/blog\/wp-content\/uploads\/2021\/12\/Testing-Third-Party-Integration-Using-Mock-Data.jpg\",\"datePublished\":\"2019-03-20T14:10:48+00:00\",\"dateModified\":\"2024-11-26T08:59:07+00:00\",\"author\":{\"@id\":\"https:\/\/djangostars.com\/blog\/#\/schema\/person\/183a654c18587fc734d2e649ae17dfea\"},\"description\":\"Using third-party services can be risky. Test your product's integration with mock data instead of standard tests to ensure smoother and more dependable results.\",\"breadcrumb\":{\"@id\":\"https:\/\/djangostars.com\/blog\/testing-third-party-integration-using-mock-data\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/djangostars.com\/blog\/testing-third-party-integration-using-mock-data\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/djangostars.com\/blog\/testing-third-party-integration-using-mock-data\/#primaryimage\",\"url\":\"https:\/\/djangostars.com\/blog\/wp-content\/uploads\/2021\/12\/Testing-Third-Party-Integration-Using-Mock-Data.jpg\",\"contentUrl\":\"https:\/\/djangostars.com\/blog\/wp-content\/uploads\/2021\/12\/Testing-Third-Party-Integration-Using-Mock-Data.jpg\",\"width\":1440,\"height\":620,\"caption\":\"Testing-Third-Party-Integration-Using-Mock-Data\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/djangostars.com\/blog\/testing-third-party-integration-using-mock-data\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/djangostars.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Testing Third-Party Integration Using Mock Data\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/djangostars.com\/blog\/#website\",\"url\":\"https:\/\/djangostars.com\/blog\/\",\"name\":\"Software Development Blog &amp; IT Tech Insights | Django Stars\",\"description\":\"Welcome behind the scenes of software product development. We share our best practices, tech solutions, management tips, and every useful insight we\u2018ve got while working on our projects.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/djangostars.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/djangostars.com\/blog\/#\/schema\/person\/183a654c18587fc734d2e649ae17dfea\",\"name\":\"Serhii Bolilyi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/djangostars.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c0150ee1ecb62c13eb49376f2513c94afacf1a0e078c08468061ebbe11169c9e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c0150ee1ecb62c13eb49376f2513c94afacf1a0e078c08468061ebbe11169c9e?s=96&d=mm&r=g\",\"caption\":\"Serhii Bolilyi\"},\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/serhiibolilyi\/\"],\"url\":\"https:\/\/djangostars.com\/blog\/author\/serhii-bolilyi\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Software Development Blog &amp; IT Tech Insights | Django Stars","description":"Using third-party services can be risky. Test your product's integration with mock data instead of standard tests to ensure smoother and more dependable results.","canonical":"https:\/\/djangostars.com\/blog\/wp-json\/wp\/v2\/posts\/887","og_locale":"en_US","og_type":"article","og_title":"Testing Third-Party Integration Using Mock Data","og_description":"Using third-party services may be risky, if you\u2019re not confident in what you\u2019re using. Test how well your product is integrated with a third-party service by using mock data instead of standard tests.","og_url":"https:\/\/djangostars.com\/blog\/testing-third-party-integration-using-mock-data\/","og_site_name":"Software Development Blog &amp; IT Tech Insights | Django Stars","article_publisher":"https:\/\/www.facebook.com\/djangostars\/","article_published_time":"2019-03-20T14:10:48+00:00","article_modified_time":"2024-11-26T08:59:07+00:00","og_image":[{"url":"https:\/\/djangostars.com\/blog\/uploads\/2019\/03\/cover-15.png","type":"","width":"","height":""}],"author":"Serhii Bolilyi","twitter_card":"summary_large_image","twitter_title":"Testing Third-Party Integration Using Mock Data","twitter_description":"Using third-party services may be risky, if you\u2019re not confident in what you\u2019re using. Test how well your product is integrated with a third-party service by using mock data instead of standard tests.","twitter_creator":"@djangostars","twitter_site":"@djangostars","twitter_misc":{"Written by":"Serhii Bolilyi","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/djangostars.com\/blog\/testing-third-party-integration-using-mock-data\/#article","isPartOf":{"@id":"https:\/\/djangostars.com\/blog\/testing-third-party-integration-using-mock-data\/"},"author":{"name":"Serhii Bolilyi","@id":"https:\/\/djangostars.com\/blog\/#\/schema\/person\/183a654c18587fc734d2e649ae17dfea"},"headline":"Testing Third-Party Integration Using Mock Data","datePublished":"2019-03-20T14:10:48+00:00","dateModified":"2024-11-26T08:59:07+00:00","mainEntityOfPage":{"@id":"https:\/\/djangostars.com\/blog\/testing-third-party-integration-using-mock-data\/"},"wordCount":1990,"commentCount":0,"image":{"@id":"https:\/\/djangostars.com\/blog\/testing-third-party-integration-using-mock-data\/#primaryimage"},"thumbnailUrl":"https:\/\/djangostars.com\/blog\/wp-content\/uploads\/2021\/12\/Testing-Third-Party-Integration-Using-Mock-Data.jpg","keywords":["API","Testing"],"articleSection":["Python &amp; Django","QA"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/djangostars.com\/blog\/testing-third-party-integration-using-mock-data\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/djangostars.com\/blog\/testing-third-party-integration-using-mock-data\/","url":"https:\/\/djangostars.com\/blog\/testing-third-party-integration-using-mock-data\/","name":"Testing Third-Party Integration Using Mock Data","isPartOf":{"@id":"https:\/\/djangostars.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/djangostars.com\/blog\/testing-third-party-integration-using-mock-data\/#primaryimage"},"image":{"@id":"https:\/\/djangostars.com\/blog\/testing-third-party-integration-using-mock-data\/#primaryimage"},"thumbnailUrl":"https:\/\/djangostars.com\/blog\/wp-content\/uploads\/2021\/12\/Testing-Third-Party-Integration-Using-Mock-Data.jpg","datePublished":"2019-03-20T14:10:48+00:00","dateModified":"2024-11-26T08:59:07+00:00","author":{"@id":"https:\/\/djangostars.com\/blog\/#\/schema\/person\/183a654c18587fc734d2e649ae17dfea"},"description":"Using third-party services can be risky. Test your product's integration with mock data instead of standard tests to ensure smoother and more dependable results.","breadcrumb":{"@id":"https:\/\/djangostars.com\/blog\/testing-third-party-integration-using-mock-data\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/djangostars.com\/blog\/testing-third-party-integration-using-mock-data\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/djangostars.com\/blog\/testing-third-party-integration-using-mock-data\/#primaryimage","url":"https:\/\/djangostars.com\/blog\/wp-content\/uploads\/2021\/12\/Testing-Third-Party-Integration-Using-Mock-Data.jpg","contentUrl":"https:\/\/djangostars.com\/blog\/wp-content\/uploads\/2021\/12\/Testing-Third-Party-Integration-Using-Mock-Data.jpg","width":1440,"height":620,"caption":"Testing-Third-Party-Integration-Using-Mock-Data"},{"@type":"BreadcrumbList","@id":"https:\/\/djangostars.com\/blog\/testing-third-party-integration-using-mock-data\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/djangostars.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Testing Third-Party Integration Using Mock Data"}]},{"@type":"WebSite","@id":"https:\/\/djangostars.com\/blog\/#website","url":"https:\/\/djangostars.com\/blog\/","name":"Software Development Blog &amp; IT Tech Insights | Django Stars","description":"Welcome behind the scenes of software product development. We share our best practices, tech solutions, management tips, and every useful insight we\u2018ve got while working on our projects.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/djangostars.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/djangostars.com\/blog\/#\/schema\/person\/183a654c18587fc734d2e649ae17dfea","name":"Serhii Bolilyi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/djangostars.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c0150ee1ecb62c13eb49376f2513c94afacf1a0e078c08468061ebbe11169c9e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c0150ee1ecb62c13eb49376f2513c94afacf1a0e078c08468061ebbe11169c9e?s=96&d=mm&r=g","caption":"Serhii Bolilyi"},"sameAs":["https:\/\/www.linkedin.com\/in\/serhiibolilyi\/"],"url":"https:\/\/djangostars.com\/blog\/author\/serhii-bolilyi\/"}]}},"_links":{"self":[{"href":"https:\/\/djangostars.com\/blog\/wp-json\/wp\/v2\/posts\/887","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/djangostars.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/djangostars.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/djangostars.com\/blog\/wp-json\/wp\/v2\/users\/29"}],"replies":[{"embeddable":true,"href":"https:\/\/djangostars.com\/blog\/wp-json\/wp\/v2\/comments?post=887"}],"version-history":[{"count":7,"href":"https:\/\/djangostars.com\/blog\/wp-json\/wp\/v2\/posts\/887\/revisions"}],"predecessor-version":[{"id":8463,"href":"https:\/\/djangostars.com\/blog\/wp-json\/wp\/v2\/posts\/887\/revisions\/8463"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/djangostars.com\/blog\/wp-json\/wp\/v2\/media\/3546"}],"wp:attachment":[{"href":"https:\/\/djangostars.com\/blog\/wp-json\/wp\/v2\/media?parent=887"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/djangostars.com\/blog\/wp-json\/wp\/v2\/categories?post=887"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/djangostars.com\/blog\/wp-json\/wp\/v2\/tags?post=887"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}