{"id":174,"date":"2023-05-04T12:37:49","date_gmt":"2023-05-04T12:37:49","guid":{"rendered":"https:\/\/razvanvancea.ro\/blog\/?p=174"},"modified":"2024-10-02T10:12:07","modified_gmt":"2024-10-02T10:12:07","slug":"pactumjs-the-key-to-efficient-api-automation-testing","status":"publish","type":"post","link":"https:\/\/razvanvancea.ro\/blog\/2023\/05\/04\/pactumjs-the-key-to-efficient-api-automation-testing\/","title":{"rendered":"PactumJS: The Key to Efficient API Automation Testing"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div>\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"174\" class=\"elementor elementor-174\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-7527197 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"7527197\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-af4e778\" data-id=\"af4e778\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-01b531f elementor-widget elementor-widget-text-editor\" data-id=\"01b531f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>API automation testing is an essential part of software development. It ensures that the APIs are working as expected and delivering the intended results. However, the process of API testing can be time-consuming and error-prone. PactumJS is an open-source library that can help streamline the API testing process by enabling developers to write test cases that mimic real-world API calls. In this article, we&#8217;ll take a closer look at how PactumJS can be used for API automation testing.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-e15f618 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"e15f618\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-6d7d1b5\" data-id=\"6d7d1b5\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-2f51363 elementor-widget elementor-widget-heading\" data-id=\"2f51363\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\"><a href=\"https:\/\/pactumjs.github.io\/introduction\/welcome.html\" target=\"_blank\">What is PactumJS?<\/a><\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-2e402d5 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"2e402d5\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-218aab4\" data-id=\"218aab4\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-d119be9 elementor-widget elementor-widget-text-editor\" data-id=\"d119be9\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><span style=\"font-weight: 400;\"><a href=\"https:\/\/pactumjs.github.io\/introduction\/welcome.html\" target=\"_blank\" rel=\"noopener\">PactumJS<\/a> is a lightweight, f<\/span><span style=\"background-color: var(--petite-stories-background);\">ree and open-source REST API automation testing tool, that provides all the necessary ingredients for the most common things to write better API automation tests in an easy, fast &amp; fun way.<\/span><\/p><p>PactumJS provides <a href=\"https:\/\/pactumjs.github.io\/introduction\/welcome.html\" target=\"_blank\" rel=\"noopener\">great documentation<\/a> for API Testing (including GraphQL), Component Testing, Contract Testing and also a Mock server feature.<br \/><br \/><strong>Note: <\/strong>PactumJS\u00a0is not a test runner. It needs to be used alongside with a test runner like\u00a0<strong>mocha<\/strong>,\u00a0<strong>jest<\/strong>,\u00a0<strong>jasmine<\/strong>,\u00a0cucumber\u00a0or build your own if your heart desires, pactum should work out of the box.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-326bde3 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"326bde3\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-4753f93\" data-id=\"4753f93\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-dd633e6 elementor-widget elementor-widget-heading\" data-id=\"dd633e6\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Prerequisites<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-27a8406 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"27a8406\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-ebf4ce0\" data-id=\"ebf4ce0\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-3f3316d elementor-widget elementor-widget-text-editor\" data-id=\"3f3316d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><a href=\"https:\/\/nodejs.org\/en\/download\" target=\"_blank\" rel=\"noopener\">NodeJS v10 and above<\/a><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-1967764 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"1967764\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-ae0e00b\" data-id=\"ae0e00b\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-6be3ba8 elementor-widget elementor-widget-heading\" data-id=\"6be3ba8\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Getting Started with PactumJS<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-ed63cfa elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"ed63cfa\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-bbaa6e0\" data-id=\"bbaa6e0\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-30b311d elementor-widget elementor-widget-text-editor\" data-id=\"30b311d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><span style=\"font-weight: 400;\">To get started with PactumJS, you first need to install it. You can install it using the following command<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-a9fd05f elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"a9fd05f\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-5b0e592\" data-id=\"5b0e592\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-a0a170e elementor-widget elementor-widget-text-editor\" data-id=\"a0a170e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><strong>npm install -D pactum mocha npx<\/strong><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-21c11db elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"21c11db\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-bf270a8\" data-id=\"bf270a8\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-f76aa41 elementor-widget elementor-widget-heading\" data-id=\"f76aa41\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Demo Apps<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-91193ff elementor-widget elementor-widget-text-editor\" data-id=\"91193ff\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>For demo purpose, we will be using both free to use <a href=\"https:\/\/qa-practice.netlify.app\/api-testing.html\" target=\"_blank\" rel=\"noopener\">QA-Practice REST application<\/a> and also <a href=\"https:\/\/qa-practice.netlify.app\/graphql-testing.html\" target=\"_blank\" rel=\"noopener\">QA-Practice GraphQL app<\/a><\/p><p>If you have <a href=\"https:\/\/docs.docker.com\/desktop\/install\/windows-install\/\" target=\"_blank\" rel=\"noopener\">Docker<\/a> installed on your machine, feel free to start the REST API application on local machine with this simple CLI command<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8c7fd4d elementor-widget elementor-widget-text-editor\" data-id=\"8c7fd4d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<pre><strong>docker run -d --rm --name qa-practice-api -p8887:8081 rvancea\/qa-practice-api:latest<\/strong><\/pre>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a01ab86 elementor-widget elementor-widget-text-editor\" data-id=\"a01ab86\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><a href=\"http:\/\/localhost:8887\/swagger-ui.html#\/employee-controller\" target=\"_blank\" rel=\"noopener\">The REST API app will be up and running on THIS URL<\/a><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a7f54f1 elementor-widget elementor-widget-image\" data-id=\"a7f54f1\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"640\" height=\"406\" src=\"https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/qa-practice-rest-1024x650.png\" class=\"attachment-large size-large wp-image-178\" alt=\"\" srcset=\"https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/qa-practice-rest-1024x650.png 1024w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/qa-practice-rest-300x191.png 300w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/qa-practice-rest-768x488.png 768w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/qa-practice-rest-850x540.png 850w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/qa-practice-rest-24x15.png 24w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/qa-practice-rest-36x23.png 36w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/qa-practice-rest-48x30.png 48w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/qa-practice-rest.png 1222w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4b79bce elementor-widget elementor-widget-text-editor\" data-id=\"4b79bce\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>The same goes for <a href=\"https:\/\/qa-practice.netlify.app\/graphql-testing.html\" target=\"_blank\" rel=\"noopener\">QA-Practice GraphQL App:<\/a> using <a href=\"https:\/\/docs.docker.com\/desktop\/install\/windows-install\/\" target=\"_blank\" rel=\"noopener\">Docker<\/a> , feel free to start it on local machine with this simple CLI command<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3890716 elementor-widget elementor-widget-text-editor\" data-id=\"3890716\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<pre><strong>docker run -d --rm --name qa-practice-graphql -p 5000:5000 rvancea\/qa-practice-graphql<\/strong><\/pre>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-663b7df elementor-widget elementor-widget-text-editor\" data-id=\"663b7df\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><a href=\"http:\/\/localhost:5000\/graphql\" target=\"_blank\" rel=\"noopener\">The GraphQL APP will be up and running on THIS URL<\/a><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b56f4ea elementor-widget elementor-widget-image\" data-id=\"b56f4ea\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"640\" height=\"331\" src=\"https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/graphql-qa-practice2-1024x530.png\" class=\"attachment-large size-large wp-image-181\" alt=\"\" srcset=\"https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/graphql-qa-practice2-1024x530.png 1024w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/graphql-qa-practice2-300x155.png 300w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/graphql-qa-practice2-768x398.png 768w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/graphql-qa-practice2-1536x796.png 1536w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/graphql-qa-practice2-850x440.png 850w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/graphql-qa-practice2-24x12.png 24w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/graphql-qa-practice2-36x19.png 36w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/graphql-qa-practice2-48x25.png 48w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/graphql-qa-practice2.png 1815w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4c5ec6c elementor-widget elementor-widget-spacer\" data-id=\"4c5ec6c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-16ba0e2 elementor-widget elementor-widget-heading\" data-id=\"16ba0e2\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Writing a basic test scenario<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-52000f2 elementor-widget elementor-widget-image\" data-id=\"52000f2\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"640\" height=\"213\" src=\"https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/rest-get-employees.png\" class=\"attachment-large size-large wp-image-179\" alt=\"\" srcset=\"https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/rest-get-employees.png 822w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/rest-get-employees-300x100.png 300w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/rest-get-employees-768x255.png 768w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/rest-get-employees-24x8.png 24w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/rest-get-employees-36x12.png 36w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/rest-get-employees-48x16.png 48w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-fe0e11b elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"fe0e11b\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-a2f3390\" data-id=\"a2f3390\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-048eafc elementor-widget elementor-widget-text-editor\" data-id=\"048eafc\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><span style=\"font-weight: 400;\">In this example, we are making a GET request to the <a href=\"https:\/\/qa-practice.netlify.app\/api-testing.html\" target=\"_blank\" rel=\"noopener\">QA-Practice REST app<\/a>\u00a0and assert that it returns a 200 response status code. PactumJS provides a fluent syntax that makes it easy to write test cases and it is packed with a rich set of features for making HTTP requests &amp; validating the server responses. Head over to\u00a0<a href=\"https:\/\/pactumjs.github.io\/api\/requests\/spec.html\" target=\"_blank\" rel=\"noopener\">Requests<\/a>\u00a0and\u00a0<a href=\"https:\/\/pactumjs.github.io\/api\/assertions\/expectStatus.html\" target=\"_blank\" rel=\"noopener\">Assertions<\/a>\u00a0for more details.<br \/><\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-d8fb80a elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"d8fb80a\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-58ecb0b\" data-id=\"58ecb0b\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-abfac7c elementor-widget elementor-widget-heading\" data-id=\"abfac7c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Writing more complex tests - JWT Authorization<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-5e25f7c elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"5e25f7c\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-4f35c7c\" data-id=\"4f35c7c\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-9ffe37f elementor-widget elementor-widget-image\" data-id=\"9ffe37f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"460\" src=\"https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/pactumjs-qa-practice-auth-1024x736.png\" class=\"attachment-large size-large wp-image-177\" alt=\"pactumjs-qa-practice-rest-auth\" srcset=\"https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/pactumjs-qa-practice-auth-1024x736.png 1024w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/pactumjs-qa-practice-auth-300x216.png 300w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/pactumjs-qa-practice-auth-768x552.png 768w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/pactumjs-qa-practice-auth-850x611.png 850w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/pactumjs-qa-practice-auth-24x17.png 24w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/pactumjs-qa-practice-auth-36x26.png 36w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/pactumjs-qa-practice-auth-48x34.png 48w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/pactumjs-qa-practice-auth.png 1223w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-71675d5 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"71675d5\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-4f485e6\" data-id=\"4f485e6\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-5a337f9 elementor-widget elementor-widget-text-editor\" data-id=\"5a337f9\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><span style=\"font-weight: 400;\">In this example, we are using the before hook to generate an authorization token (JWT) and store its value in &#8216;authToken&#8217; variable.<br \/>Then we are using the stored token to make a GET Employees request (that requires authorization) and check that it returns a 200 status code (OK).<\/span><\/p><p>Finally, we add a negative test as well, trying to call the same GET Employees endpoint, but without passing the token as Authorization header, therefore the expected response status code is 401 (unauthorized).<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-e461d28 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"e461d28\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-cbee7bc\" data-id=\"cbee7bc\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-a0d1367 elementor-widget elementor-widget-heading\" data-id=\"a0d1367\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Writing a GraphQL test<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-eab1e9f elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"eab1e9f\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-192d568\" data-id=\"192d568\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-1bdca06 elementor-widget elementor-widget-image\" data-id=\"1bdca06\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"295\" src=\"https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/graphql-test-1024x472.png\" class=\"attachment-large size-large wp-image-182\" alt=\"graphql-test\" srcset=\"https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/graphql-test-1024x472.png 1024w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/graphql-test-300x138.png 300w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/graphql-test-768x354.png 768w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/graphql-test-850x392.png 850w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/graphql-test-24x11.png 24w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/graphql-test-36x17.png 36w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/graphql-test-48x22.png 48w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/graphql-test.png 1042w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-092dba8 elementor-widget elementor-widget-text-editor\" data-id=\"092dba8\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>In this example, we are sending a request and assert that the response status code is 200 and the response contains a song title called &#8216;Nothing else matters&#8217;.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-f947457 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"f947457\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-d90412d\" data-id=\"d90412d\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-cccfce9 elementor-widget elementor-widget-heading\" data-id=\"cccfce9\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Running tests<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f0b4e54 elementor-widget elementor-widget-text-editor\" data-id=\"f0b4e54\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>The tests get executed with a simple CLI command, as it follows:<br \/><br \/><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ad5b31d elementor-widget elementor-widget-text-editor\" data-id=\"ad5b31d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<pre><strong>npx mocha example.test.js<\/strong><\/pre>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c30aed1 elementor-widget elementor-widget-image\" data-id=\"c30aed1\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"172\" src=\"https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/results-pactumjs-1024x275.png\" class=\"attachment-large size-large wp-image-184\" alt=\"results-pactumjs\" srcset=\"https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/results-pactumjs-1024x275.png 1024w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/results-pactumjs-300x81.png 300w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/results-pactumjs-768x207.png 768w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/results-pactumjs-850x229.png 850w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/results-pactumjs-24x6.png 24w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/results-pactumjs-36x10.png 36w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/results-pactumjs-48x13.png 48w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/results-pactumjs.png 1108w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ed0551a elementor-widget elementor-widget-heading\" data-id=\"ed0551a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Reporters<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d1ef325 elementor-widget elementor-widget-text-editor\" data-id=\"d1ef325\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>By default, pactumjs uses <strong>spec<\/strong> reporter, meaning that the test execution will be displayed in the CLI. However, you have the flexibility to<a href=\"https:\/\/pactumjs.github.io\/guides\/reporting.html\" target=\"_blank\" rel=\"noopener\"> install other types of reporters<\/a> as dependencies (e.g. Mochawesome for HTML reports)<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-df227fa elementor-widget elementor-widget-video\" data-id=\"df227fa\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;youtube_url&quot;:&quot;https:\\\/\\\/www.youtube.com\\\/watch?v=2lNLN2QxDOk&quot;,&quot;video_type&quot;:&quot;youtube&quot;,&quot;controls&quot;:&quot;yes&quot;}\" data-widget_type=\"video.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-wrapper elementor-open-inline\">\n\t\t\t<div class=\"elementor-video\"><\/div>\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c1805f7 elementor-widget elementor-widget-heading\" data-id=\"c1805f7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Asserts<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b2a0f0d elementor-widget elementor-widget-text-editor\" data-id=\"b2a0f0d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>PactumJS&#8217;s documentation provides lots of asserts that you can find <a href=\"https:\/\/pactumjs.github.io\/api\/assertions\/expectStatus.html\" target=\"_blank\" rel=\"noopener\">HERE<\/a><\/p><p>In the next picture, we will see some of them that we can use in our tests<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e656070 elementor-widget elementor-widget-image\" data-id=\"e656070\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"507\" height=\"680\" src=\"https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/pactumjs-asserts.png\" class=\"attachment-large size-large wp-image-183\" alt=\"pactumjs-asserts\" srcset=\"https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/pactumjs-asserts.png 507w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/pactumjs-asserts-224x300.png 224w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/pactumjs-asserts-300x402.png 300w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/pactumjs-asserts-18x24.png 18w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/pactumjs-asserts-27x36.png 27w, https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/pactumjs-asserts-36x48.png 36w\" sizes=\"(max-width: 507px) 100vw, 507px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7a07ad4 elementor-widget elementor-widget-heading\" data-id=\"7a07ad4\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Conclusion<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-853b8c8 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"853b8c8\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-ddf85dc\" data-id=\"ddf85dc\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-5ca7205 elementor-widget elementor-widget-text-editor\" data-id=\"5ca7205\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><span style=\"font-weight: 400;\">By using PactumJS, you can write more comprehensive and effective API tests, ultimately leading to more reliable and high-quality software.<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c93c047 elementor-widget elementor-widget-spacer\" data-id=\"c93c047\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-380486f elementor-widget elementor-widget-text-editor\" data-id=\"380486f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Enjoyed this article? Make sure to subscribe to my\u00a0<em><a href=\"https:\/\/www.youtube.com\/@LearnwithRV\" target=\"_blank\" rel=\"noopener\">YouTube Channel<\/a><\/em>\u00a0for more Test Automation tutorials, and follow me on\u00a0<a href=\"https:\/\/www.linkedin.com\/in\/razvanvancea\/\" target=\"_blank\" rel=\"noopener\"><em>LinkedIn<\/em><\/a>\u00a0and\u00a0<em><a href=\"https:\/\/twitter.com\/razvanvancea\" target=\"_blank\" rel=\"noopener\">Twitter<\/a><\/em>\u00a0for regular insights.<strong><br \/>Looking to improve your test automation skills?<br \/><\/strong>I\u2019ve created a<strong>\u00a0personalized 1-on-1 Mentoring program\u00a0<\/strong>refined to<strong>\u00a0boost YOUR skills.\u00a0<\/strong>Reach out at\u00a0<a rel=\"noopener\">iamrv@razvanvancea.ro<\/a>\u00a0for more details and\u00a0<strong>together\u00a0<\/strong>will create a<strong>\u00a0learning path\u00a0<\/strong>adapted to your<strong>\u00a0current skills and goals\u00a0<\/strong>that you are aiming for<strong>,<\/strong>\u00a0in a<strong>\u00a0timely-efficient manner\ud83d\ude80<\/strong><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-726b52b elementor-widget elementor-widget-video\" data-id=\"726b52b\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;youtube_url&quot;:&quot;https:\\\/\\\/youtu.be\\\/UHoxxgxB6t8&quot;,&quot;video_type&quot;:&quot;youtube&quot;,&quot;controls&quot;:&quot;yes&quot;}\" data-widget_type=\"video.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-wrapper elementor-open-inline\">\n\t\t\t<div class=\"elementor-video\"><\/div>\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>API automation testing is an essential part of software development. It ensures that the APIs&#8230;<\/p>\n","protected":false},"author":1,"featured_media":188,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[11],"tags":[],"class_list":["post-174","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-qa"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"API automation testing is an essential part of software development. It ensures that the APIs are working as expected and delivering the intended results. However, the process of API testing can be time-consuming and error-prone. PactumJS is an open-source library that can help streamline the API testing process by enabling developers to write test cases\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"RV\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/razvanvancea.ro\/blog\/2023\/05\/04\/pactumjs-the-key-to-efficient-api-automation-testing\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Learn with RV - Tech Blog - #testautomation #qa #programming #linux #devops\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"PactumJS: The Key to Efficient API Automation Testing - Learn with RV - Tech Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"API automation testing is an essential part of software development. It ensures that the APIs are working as expected and delivering the intended results. However, the process of API testing can be time-consuming and error-prone. PactumJS is an open-source library that can help streamline the API testing process by enabling developers to write test cases\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/razvanvancea.ro\/blog\/2023\/05\/04\/pactumjs-the-key-to-efficient-api-automation-testing\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2023-05-04T12:37:49+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2024-10-02T10:12:07+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/razvanvancea\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/razvanvancea\/\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@RazvanVancea\" \/>\n\t\t<meta name=\"twitter:title\" content=\"PactumJS: The Key to Efficient API Automation Testing - Learn with RV - Tech Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"API automation testing is an essential part of software development. It ensures that the APIs are working as expected and delivering the intended results. However, the process of API testing can be time-consuming and error-prone. PactumJS is an open-source library that can help streamline the API testing process by enabling developers to write test cases\" \/>\n\t\t<meta name=\"twitter:creator\" content=\"@RazvanVancea\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/2023\\\/05\\\/04\\\/pactumjs-the-key-to-efficient-api-automation-testing\\\/#blogposting\",\"name\":\"PactumJS: The Key to Efficient API Automation Testing - Learn with RV - Tech Blog\",\"headline\":\"PactumJS: The Key to Efficient API Automation Testing\",\"author\":{\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/author\\\/iamrvadmin\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/pactumjs-logo.png\",\"width\":678,\"height\":323},\"datePublished\":\"2023-05-04T12:37:49+00:00\",\"dateModified\":\"2024-10-02T10:12:07+00:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/2023\\\/05\\\/04\\\/pactumjs-the-key-to-efficient-api-automation-testing\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/2023\\\/05\\\/04\\\/pactumjs-the-key-to-efficient-api-automation-testing\\\/#webpage\"},\"articleSection\":\"QA\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/2023\\\/05\\\/04\\\/pactumjs-the-key-to-efficient-api-automation-testing\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/category\\\/qa\\\/#listItem\",\"name\":\"QA\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/category\\\/qa\\\/#listItem\",\"position\":2,\"name\":\"QA\",\"item\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/category\\\/qa\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/2023\\\/05\\\/04\\\/pactumjs-the-key-to-efficient-api-automation-testing\\\/#listItem\",\"name\":\"PactumJS: The Key to Efficient API Automation Testing\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/2023\\\/05\\\/04\\\/pactumjs-the-key-to-efficient-api-automation-testing\\\/#listItem\",\"position\":3,\"name\":\"PactumJS: The Key to Efficient API Automation Testing\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/category\\\/qa\\\/#listItem\",\"name\":\"QA\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/#person\",\"name\":\"RV\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/2023\\\/05\\\/04\\\/pactumjs-the-key-to-efficient-api-automation-testing\\\/#personImage\",\"url\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/wp-content\\\/litespeed\\\/avatar\\\/91ce41471f9ba5f15b3ef99e7deed87c.jpg?ver=1785997097\",\"width\":96,\"height\":96,\"caption\":\"RV\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/razvanvancea\\\/\",\"https:\\\/\\\/twitter.com\\\/RazvanVancea\",\"https:\\\/\\\/www.youtube.com\\\/@LearnwithRV\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/razvanvancea\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/author\\\/iamrvadmin\\\/#author\",\"url\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/author\\\/iamrvadmin\\\/\",\"name\":\"RV\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/2023\\\/05\\\/04\\\/pactumjs-the-key-to-efficient-api-automation-testing\\\/#authorImage\",\"url\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/wp-content\\\/litespeed\\\/avatar\\\/91ce41471f9ba5f15b3ef99e7deed87c.jpg?ver=1785997097\",\"width\":96,\"height\":96,\"caption\":\"RV\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/razvanvancea\\\/\",\"https:\\\/\\\/twitter.com\\\/RazvanVancea\",\"https:\\\/\\\/www.youtube.com\\\/@LearnwithRV\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/razvanvancea\"]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/2023\\\/05\\\/04\\\/pactumjs-the-key-to-efficient-api-automation-testing\\\/#webpage\",\"url\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/2023\\\/05\\\/04\\\/pactumjs-the-key-to-efficient-api-automation-testing\\\/\",\"name\":\"PactumJS: The Key to Efficient API Automation Testing - Learn with RV - Tech Blog\",\"description\":\"API automation testing is an essential part of software development. It ensures that the APIs are working as expected and delivering the intended results. However, the process of API testing can be time-consuming and error-prone. PactumJS is an open-source library that can help streamline the API testing process by enabling developers to write test cases\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/2023\\\/05\\\/04\\\/pactumjs-the-key-to-efficient-api-automation-testing\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/author\\\/iamrvadmin\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/author\\\/iamrvadmin\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/pactumjs-logo.png\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/2023\\\/05\\\/04\\\/pactumjs-the-key-to-efficient-api-automation-testing\\\/#mainImage\",\"width\":678,\"height\":323},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/2023\\\/05\\\/04\\\/pactumjs-the-key-to-efficient-api-automation-testing\\\/#mainImage\"},\"datePublished\":\"2023-05-04T12:37:49+00:00\",\"dateModified\":\"2024-10-02T10:12:07+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/\",\"name\":\"Learn with RV - Tech Blog\",\"description\":\"#testautomation #qa #programming #linux #devops\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/razvanvancea.ro\\\/blog\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"PactumJS: The Key to Efficient API Automation Testing - Learn with RV - Tech Blog","description":"API automation testing is an essential part of software development. It ensures that the APIs are working as expected and delivering the intended results. However, the process of API testing can be time-consuming and error-prone. PactumJS is an open-source library that can help streamline the API testing process by enabling developers to write test cases","canonical_url":"https:\/\/razvanvancea.ro\/blog\/2023\/05\/04\/pactumjs-the-key-to-efficient-api-automation-testing\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/razvanvancea.ro\/blog\/2023\/05\/04\/pactumjs-the-key-to-efficient-api-automation-testing\/#blogposting","name":"PactumJS: The Key to Efficient API Automation Testing - Learn with RV - Tech Blog","headline":"PactumJS: The Key to Efficient API Automation Testing","author":{"@id":"https:\/\/razvanvancea.ro\/blog\/author\/iamrvadmin\/#author"},"publisher":{"@id":"https:\/\/razvanvancea.ro\/blog\/#person"},"image":{"@type":"ImageObject","url":"https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/pactumjs-logo.png","width":678,"height":323},"datePublished":"2023-05-04T12:37:49+00:00","dateModified":"2024-10-02T10:12:07+00:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/razvanvancea.ro\/blog\/2023\/05\/04\/pactumjs-the-key-to-efficient-api-automation-testing\/#webpage"},"isPartOf":{"@id":"https:\/\/razvanvancea.ro\/blog\/2023\/05\/04\/pactumjs-the-key-to-efficient-api-automation-testing\/#webpage"},"articleSection":"QA"},{"@type":"BreadcrumbList","@id":"https:\/\/razvanvancea.ro\/blog\/2023\/05\/04\/pactumjs-the-key-to-efficient-api-automation-testing\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/razvanvancea.ro\/blog#listItem","position":1,"name":"Home","item":"https:\/\/razvanvancea.ro\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/razvanvancea.ro\/blog\/category\/qa\/#listItem","name":"QA"}},{"@type":"ListItem","@id":"https:\/\/razvanvancea.ro\/blog\/category\/qa\/#listItem","position":2,"name":"QA","item":"https:\/\/razvanvancea.ro\/blog\/category\/qa\/","nextItem":{"@type":"ListItem","@id":"https:\/\/razvanvancea.ro\/blog\/2023\/05\/04\/pactumjs-the-key-to-efficient-api-automation-testing\/#listItem","name":"PactumJS: The Key to Efficient API Automation Testing"},"previousItem":{"@type":"ListItem","@id":"https:\/\/razvanvancea.ro\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/razvanvancea.ro\/blog\/2023\/05\/04\/pactumjs-the-key-to-efficient-api-automation-testing\/#listItem","position":3,"name":"PactumJS: The Key to Efficient API Automation Testing","previousItem":{"@type":"ListItem","@id":"https:\/\/razvanvancea.ro\/blog\/category\/qa\/#listItem","name":"QA"}}]},{"@type":"Person","@id":"https:\/\/razvanvancea.ro\/blog\/#person","name":"RV","image":{"@type":"ImageObject","@id":"https:\/\/razvanvancea.ro\/blog\/2023\/05\/04\/pactumjs-the-key-to-efficient-api-automation-testing\/#personImage","url":"https:\/\/razvanvancea.ro\/blog\/wp-content\/litespeed\/avatar\/91ce41471f9ba5f15b3ef99e7deed87c.jpg?ver=1785997097","width":96,"height":96,"caption":"RV"},"sameAs":["https:\/\/www.facebook.com\/razvanvancea\/","https:\/\/twitter.com\/RazvanVancea","https:\/\/www.youtube.com\/@LearnwithRV","https:\/\/www.linkedin.com\/in\/razvanvancea"]},{"@type":"Person","@id":"https:\/\/razvanvancea.ro\/blog\/author\/iamrvadmin\/#author","url":"https:\/\/razvanvancea.ro\/blog\/author\/iamrvadmin\/","name":"RV","image":{"@type":"ImageObject","@id":"https:\/\/razvanvancea.ro\/blog\/2023\/05\/04\/pactumjs-the-key-to-efficient-api-automation-testing\/#authorImage","url":"https:\/\/razvanvancea.ro\/blog\/wp-content\/litespeed\/avatar\/91ce41471f9ba5f15b3ef99e7deed87c.jpg?ver=1785997097","width":96,"height":96,"caption":"RV"},"sameAs":["https:\/\/www.facebook.com\/razvanvancea\/","https:\/\/twitter.com\/RazvanVancea","https:\/\/www.youtube.com\/@LearnwithRV","https:\/\/www.linkedin.com\/in\/razvanvancea"]},{"@type":"WebPage","@id":"https:\/\/razvanvancea.ro\/blog\/2023\/05\/04\/pactumjs-the-key-to-efficient-api-automation-testing\/#webpage","url":"https:\/\/razvanvancea.ro\/blog\/2023\/05\/04\/pactumjs-the-key-to-efficient-api-automation-testing\/","name":"PactumJS: The Key to Efficient API Automation Testing - Learn with RV - Tech Blog","description":"API automation testing is an essential part of software development. It ensures that the APIs are working as expected and delivering the intended results. However, the process of API testing can be time-consuming and error-prone. PactumJS is an open-source library that can help streamline the API testing process by enabling developers to write test cases","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/razvanvancea.ro\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/razvanvancea.ro\/blog\/2023\/05\/04\/pactumjs-the-key-to-efficient-api-automation-testing\/#breadcrumblist"},"author":{"@id":"https:\/\/razvanvancea.ro\/blog\/author\/iamrvadmin\/#author"},"creator":{"@id":"https:\/\/razvanvancea.ro\/blog\/author\/iamrvadmin\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/pactumjs-logo.png","@id":"https:\/\/razvanvancea.ro\/blog\/2023\/05\/04\/pactumjs-the-key-to-efficient-api-automation-testing\/#mainImage","width":678,"height":323},"primaryImageOfPage":{"@id":"https:\/\/razvanvancea.ro\/blog\/2023\/05\/04\/pactumjs-the-key-to-efficient-api-automation-testing\/#mainImage"},"datePublished":"2023-05-04T12:37:49+00:00","dateModified":"2024-10-02T10:12:07+00:00"},{"@type":"WebSite","@id":"https:\/\/razvanvancea.ro\/blog\/#website","url":"https:\/\/razvanvancea.ro\/blog\/","name":"Learn with RV - Tech Blog","description":"#testautomation #qa #programming #linux #devops","inLanguage":"en-US","publisher":{"@id":"https:\/\/razvanvancea.ro\/blog\/#person"}}]},"og:locale":"en_US","og:site_name":"Learn with RV - Tech Blog - #testautomation #qa #programming #linux #devops","og:type":"article","og:title":"PactumJS: The Key to Efficient API Automation Testing - Learn with RV - Tech Blog","og:description":"API automation testing is an essential part of software development. It ensures that the APIs are working as expected and delivering the intended results. However, the process of API testing can be time-consuming and error-prone. PactumJS is an open-source library that can help streamline the API testing process by enabling developers to write test cases","og:url":"https:\/\/razvanvancea.ro\/blog\/2023\/05\/04\/pactumjs-the-key-to-efficient-api-automation-testing\/","article:published_time":"2023-05-04T12:37:49+00:00","article:modified_time":"2024-10-02T10:12:07+00:00","article:publisher":"https:\/\/www.facebook.com\/razvanvancea","article:author":"https:\/\/www.facebook.com\/razvanvancea\/","twitter:card":"summary_large_image","twitter:site":"@RazvanVancea","twitter:title":"PactumJS: The Key to Efficient API Automation Testing - Learn with RV - Tech Blog","twitter:description":"API automation testing is an essential part of software development. It ensures that the APIs are working as expected and delivering the intended results. However, the process of API testing can be time-consuming and error-prone. PactumJS is an open-source library that can help streamline the API testing process by enabling developers to write test cases","twitter:creator":"@RazvanVancea"},"aioseo_meta_data":{"post_id":"174","title":null,"description":null,"keywords":[],"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2023-05-04 09:15:11","updated":"2025-06-06 09:25:16","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/razvanvancea.ro\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/razvanvancea.ro\/blog\/category\/qa\/\" title=\"QA\">QA<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tPactumJS: The Key to Efficient API Automation Testing\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/razvanvancea.ro\/blog"},{"label":"QA","link":"https:\/\/razvanvancea.ro\/blog\/category\/qa\/"},{"label":"PactumJS: The Key to Efficient API Automation Testing","link":"https:\/\/razvanvancea.ro\/blog\/2023\/05\/04\/pactumjs-the-key-to-efficient-api-automation-testing\/"}],"jetpack_featured_media_url":"https:\/\/razvanvancea.ro\/blog\/wp-content\/uploads\/2023\/05\/pactumjs-logo.png","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/razvanvancea.ro\/blog\/wp-json\/wp\/v2\/posts\/174","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/razvanvancea.ro\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/razvanvancea.ro\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/razvanvancea.ro\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/razvanvancea.ro\/blog\/wp-json\/wp\/v2\/comments?post=174"}],"version-history":[{"count":20,"href":"https:\/\/razvanvancea.ro\/blog\/wp-json\/wp\/v2\/posts\/174\/revisions"}],"predecessor-version":[{"id":973,"href":"https:\/\/razvanvancea.ro\/blog\/wp-json\/wp\/v2\/posts\/174\/revisions\/973"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/razvanvancea.ro\/blog\/wp-json\/wp\/v2\/media\/188"}],"wp:attachment":[{"href":"https:\/\/razvanvancea.ro\/blog\/wp-json\/wp\/v2\/media?parent=174"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/razvanvancea.ro\/blog\/wp-json\/wp\/v2\/categories?post=174"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/razvanvancea.ro\/blog\/wp-json\/wp\/v2\/tags?post=174"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}