Turn your manual testers into automation experts! Request a DemoStart testRigor Free

HubSpot Testing

HubSpot is a customer relationship management (CRM) platform designed to empower businesses of all sizes with inbound marketing, sales, and customer service tools. It aims to help companies attract, engage, and retain customers by offering a unified suite that streamlines various aspects of customer interaction.

HubSpot was founded in 2006 by Brian Halligan and Dharmesh Shah at the Massachusetts Institute of Technology (MIT). These founders recognized a shift in how people were making buying decisions. Instead of being receptive to interruptive advertising and cold calls, customers increasingly turned to the Internet to research and seek solutions on their own terms.

HubSpot aimed to revolutionize marketing and sales with this insight. Their platform provides tools that help businesses attract visitors through helpful content (blogging, SEO, social media), convert those visitors into leads with forms and email marketing, and then nurture them through sales. This “inbound marketing” concept focuses on providing value to customers, ultimately making sales a more natural and seamless experience.

Here’s a breakdown of key features and functionalities:

Marketing Hub

  • Landing page creation: Build and manage landing pages for lead generation and campaign promotion.
  • Email marketing: Design and send personalized email campaigns, automate workflows, and track email performance.
  • SEO tools: Optimize website content for search engines and improve organic traffic.
  • Social media management: Schedule and publish social media posts, track engagement, and analyze performance.
  • Content management system (CMS): Create and manage website content, blogs, and landing pages.

Sales Hub

  • CRM tools: Manage contacts, track deals, automate workflows, and gain insights into your sales pipeline.
  • Email tracking and automation: Track email opens and clicks and automate email sequences based on prospect behavior.
  • Meeting schedule: Schedule meetings with prospects and customers quickly.
  • Quotes and proposals: Create and send professional quotes and proposals to potential customers.

Read more about testing HubSpot Sales Hub.

Service Hub

  • Ticketing system: Manage customer support inquiries and track their resolution.
  • Live chat: Offer real-time chat support to customers on your website.
  • Knowledge base: Create a self-service knowledge base for customers to find answers to common questions.
  • Customer feedback tools: Collect feedback from customers through surveys and forms.

HubSpot App Marketplace

This marketplace, accessible within HubSpot, allows users to discover and integrate a vast collection of third-party apps. These apps extend the functionality of HubSpot by connecting to existing tools and services, adding specialized features, or catering to specific industry needs.

Hubspot testing can be performed manually or through automated testing tools. Automated testing tools can speed up the testing process, improve accuracy, and reduce the risk of human error. For the front end, HubSpot uses HTML, CSS, and JavaScript; the back end mainly uses Python, Java, and C++.

Testing HubSpot Integrations

Testing HubSpot integrations is necessary to ensure there are no issues in data flow between HubSpot and the application we integrate with. This is crucial for maintaining data accuracy, reliability, and timeliness across the systems. Through testing, companies can verify that data flows correctly between systems, minimizing the risk of errors or data loss that could lead to misinformed decisions or negatively impact customer interactions. Additionally, testing helps identify compatibility issues or bugs within the integration process, ensuring that automation workflows operate efficiently and the overall system remains stable.

To ensure there are no such issues, it’s always suggested that the application goes through different levels of testing, like unit testing, integration testing, and end-to-end testing.

Unit testing

It refers explicitly to testing the functionality of your custom code that interacts with HubSpot’s APIs. It’s about ensuring your code behaves as expected when working with HubSpot data or functionalities. The primary focus is on isolated units of your code, not the entire integration or HubSpot itself.

You’re testing how your code interacts with HubSpot’s APIs, handles responses, and performs the desired actions. In unit testing, what we test is:

  • API Calls:
    • Test if your code constructs the correct API requests (e.g., URLs, parameters, headers).
    • Verify it handles responses appropriately, parsing data and extracting relevant information.
    • Check for error handling mechanisms and how your code reacts to different response codes (success, errors).
  • Data Processing:
    • Ensure your code correctly transforms or manipulates data received from HubSpot’s APIs before using it further.
    • Test how your code handles unexpected data formats or missing information from the API response.
  • Functionality Specific to Your Integration:
    • Beyond fundamental API interactions, test the core functionalities of your custom code related to the HubSpot integration.
    • This might involve testing calculations, transformations, or actions your code performs based on HubSpot data.

The choice of tools for unit testing HubSpot integrations depends mainly on the technology stack used for the integration. Let’s review a few commonly used unit testing tools based on each framework used for integration.


The go-to unit testing framework for Java, JUnit, offers a comprehensive suite of features to streamline your testing process.


  • Test Annotations: JUnit uses annotations to simplify test organization and execution. You can mark methods with annotations like @Test to identify them as unit tests.
  • Test Runners: JUnit provides a built-in test runner that executes your tests and presents results.
  • Assertions: JUnit offers a rich set of assertion methods (e.g., assertEquals, assertTrue) to verify expected outcomes in your tests.
  • Test Suites: You can group related tests into suites for better organization and execution control.

How it helps HubSpot unit testing:

JUnit allows you to write clear and concise unit tests for your custom Java code interacting with the HubSpot API. Using JUnit’s mocking libraries like Mockito, you can isolate your code and simulate API interactions to ensure your code functions as expected.


A popular unit testing framework known for its flexibility and BDD (Behavior-Driven Development) approach, Pytest makes writing and managing unit tests in Python a breeze.


  • Simple and Concise Syntax: Pytest uses a natural language-like approach for defining tests, improving readability and maintainability.
  • Fixtures: Pytest allows you to define fixtures reusable code snippets that set up test environments or provide common test data.
  • Parametrization: Pytest supports parametrization, enabling you to run the same test with different data sets for thorough testing.
  • Plugins: Pytest has a rich ecosystem of plugins that extend its functionality, such as reporting, integration with continuous integration tools, and more.

How it helps HubSpot unit testing:

Pytest allows you to write clear unit tests for your Python code interacting with HubSpot’s API. In combination with mocking libraries like Mock, you can isolate your code and create mock objects to simulate API behavior during testing, ensuring your code interacts with the HubSpot API as intended.


A beloved choice for JavaScript testing, Jest offers a feature-rich environment for writing, running, and managing unit tests.


  • Fast Test Execution: Jest is known for its exceptional speed, providing near-instant feedback during test development.
  • Test Watchers: It offers a test watcher that automatically re-runs tests whenever your code changes.
  • Code Coverage Reports: It can generate comprehensive reports highlighting areas of your code that your tests haven’t exercised.
  • Snapshot Testing: Jest supports snapshot testing, a technique for verifying the output of your code components to ensure they continue to render UI elements as expected.

How it helps HubSpot unit testing:

Jest allows you to write unit tests for your JavaScript code interacting with the HubSpot API. It integrates well with mocking libraries like Sinon.JS, enabling you to create mock objects and simulate API responses during testing. This ensures your JavaScript code interacts with the HubSpot API as intended.

Now, let’s look at a sample unit test script using Jest.
const sinon = require('sinon');
const axios = require('axios');
const { createContact } = require('./hubspotIntegration');

describe('createContact', () => {
  let axiosPostStub;

  beforeEach(() => {
    // Mock the axios.post method before each test
    axiosPostStub = sinon.stub(axios, 'post').resolves({ data: { id: '123', message: 'Contact created' } });

  afterEach(() => {
    // Restore the original axios.post method after each test

  it('should create a new contact and return response data', async () => {
    const contactData = { firstName: 'John', lastName: 'Doe', email: '[email protected]' };
    const result = await createContact(contactData);

    // Check if axios.post was called with the correct URL and data
    expect(axiosPostStub.calledWith('https://api.hubapi.com/contacts/v1/contact/', contactData)).toBeTruthy();

    // Verify the function returns the correct response data
    expect(result).toEqual({ id: '123', message: 'Contact created' });

  it('should throw an error when the API call fails', async () => {
    axiosPostStub.rejects(new Error('API Error'));
    await expect(createContact({})).rejects.toThrow('Failed to create contact');

Explaining the above test suite in detail:

  • We use sinon.stub to mock axios.post method before each test, making it resolve with mocked response data or reject it with an error, depending on the test.
  • In the first test, we assert that axios.post was called with the correct arguments and that createContact returns the expected data structure.
  • In the second test, we make axios.post reject with an error to test the error handling logic of createContact, expecting it to throw an error.

Integrations testing

There are two main reasons why integration testing is crucial for HubSpot integrations. Firstly, HubSpot itself is a complex system with various features and functionalities. When you add another application on top of that through an integration, you create a new, interconnected system. Integration testing ensures all the different parts communicate seamlessly and behave as expected. This helps avoid data inconsistencies, errors, and disruptions in your workflows.

Secondly, integrations are rarely static. Updates to either HubSpot or the integrated application can introduce unforeseen issues. Integration testing helps catch these problems early on before they impact your daily operations. By proactively testing your integrations, you can ensure a smooth flow of information and maintain the overall reliability of your HubSpot ecosystem.

Integration testing can also be performed at the UI and API levels. So, let’s review common tools used for the testing.

API Integration Testing

We discuss Postman and SoapUI for API integration testing here:


Postman is a popular API development tool developers and testers use to build, test, and modify APIs. It supports RESTful and SOAP APIs, making it versatile for various integration scenarios, including those with HubSpot.

Key Features for HubSpot Integration Testing:

  • Easy to Use: Postman’s user-friendly interface makes it simple to create and send HTTP requests and then inspect the responses. This is particularly useful for testing the API calls your HubSpot integration makes.
  • Collections and Environments: You can organize your API requests into collections and define environments for different stages of development (e.g., development, staging, production). This organization aids in systematically testing your integration under different configurations.
  • Pre-request Scripts: These scripts run before an API call is made, allowing you to set up the necessary conditions for your test, such as generating authentication tokens or setting dynamic variables.

It is an open-source web service testing application for SOAP and REST APIs. It’s designed to test API functionality, security, and performance, making it a comprehensive tool for integration testing, including with platforms like HubSpot.

Key Features for HubSpot Integration Testing:

  • Protocol Support: While its name suggests a focus on SOAP, SoapUI also robustly supports RESTful API testing. This dual support is beneficial for testing integrations with various services, including HubSpot’s REST APIs.
  • Functional Testing: SoapUI allows you to create test suites, test cases, and assertions to verify the functionality of your HubSpot integration. This includes checking the correctness of API responses and ensuring that your integration handles API requests as expected.
  • Security Testing: It offers built-in security tests, allowing you to perform scans for common security vulnerabilities in your integration. This is crucial for ensuring that data exchanged with HubSpot is handled securely.

UI Integration Testing

One commonly used tool for UI integration testing is Selenium. We can discuss it in the E2E testing phase.

End-to-end testing

Regular E2E testing is vital for robust HubSpot integrations. It goes beyond individual components, mimicking real user experiences. This broader perspective ensures the entire system functions seamlessly, from user interface to back-end processes. Unlike unit or integration testing, E2E testing reveals issues that might be missed in isolation, like data flow problems or clunky user journeys.

E2E testing validates critical aspects for smooth CRM, marketing, and sales. It verifies data accuracy, authentication flows, and third-party integrations. This proactive approach ensures the integration remains reliable and adapts to updates, fostering user trust and business success. Let us go through the tools that we can use for E2E testing.


Selenium was a commonly used UI automation tool by many companies. The main advantage of Selenium is that it is open-source; anyone can customize the framework. However, using Selenium has many disadvantages, such as code complexity. As the automation code count increases, debugging becomes impossible, and more time will be spent on maintenance tasks.

There are many other reasons why Selenium is not used for automation testing. Here, we are not covering much detail about Selenium, but if you would like to know about building Selenium tests, you can refer to this blog.

One of the most commonly used tools explicitly designed for E2E testing is testRigor. Let us learn about it in detail.

testRigor for E2E testing

A common question that comes to everyone’s mind would be, what is unique about testRigor that makes it stand out from other tools? The answer is it’s packed with many powerful features, making it a well-crafted E2E testing tool. So, let us go through a few features:

  • Plug and Play tool: testRigor is a cloud-hosted tool. You just need to sign up, purchase a plan, and use it. There is no need to worry about setting up the infra, installation, etc. testRigor saves a lot of time and money here.
  • Comprehensive Integrations: The next headache will be integrations once the installation is done. We must find the proper integration versions and ensure integrations won’t fail during an upgrade. testRigor is packed with almost every integration you would need. You can read more about supported testRigor integrations here.
  • No-code Automation: testRigor simplifies the pre-requisite of having programming language skills and lets you create test scripts in plain parsed English. That means manual testers can create test scripts faster than an automation engineer automating using a traditional automation framework. Also, business analysts or stakeholders who review the test scripts can easily modify the scenario. With generative AI, you can generate tests or test data based on the description you provide.
  • Custom Element Locators: testRigor does not rely on flaky XPath or CSS selectors; instead, it uses its stable way of identifying elements, i.e., testRigor locators. This process has become more straightforward and human, thanks to AI algorithms. You just mention the UI text that you see on the screen or its position to identify the element, such as:
    click "cart"
    click on button "Delete" below "Section Name"
  • Testing Powerhouse: Another headache is that you may need to keep multiple frameworks for each type of testing, such as mobile, web, and desktop. However, testRigor is one tool that supports most types of testing. So, there is no need to keep multiple frameworks. You can perform the below testing types using plain English commands:

These are just the tip of the iceberg. Read to know the top features of testRigor.

Now, let us review a sample script using testRigor.
open url "https://www.loginurl.com"
enter stored value "UserName" into "User Name"
enter stored value "password" into "Password"
click "Sign in"
click “Employees”
click “Add New Employee”
enter "John" into "First Name"
enter "Doe" into "Last Name"
click "Submit"

The example above clearly shows the simplicity of testRigor test script creation, maintenance, and other test activities as automation progresses to the next level.

HubSpot Marketplace Certification process

Once you’re confident about your app’s functionality through internal testing, you can submit it for certification through the HubSpot App Marketplace. Here’s what to expect:

  • Provide Testing Credentials: HubSpot requires you to provide them with access to a test account or environment within your app. They’ll use this to verify your app’s functionality and adherence to their guidelines. You can use the email address [email protected] to invite HubSpot for testing purposes.
  • Review Process: HubSpot will review your app for functionality, security, and compliance with their App Marketplace guidelines. This may involve additional testing on their end.
  • Feedback and Iteration: You might receive feedback from HubSpot on areas for improvement or potential issues identified during their review. Be prepared to address their concerns and resubmit your app for final approval.

Additional Resources

Join the next wave of functional testing now.
A testRigor specialist will walk you through our platform with a custom demo.
Related Articles

Azure Testing

Microsoft Azure’s initial focus was on web hosting and data storage, which is ideally suited for web developers. ...

AWS Testing

Launched in 2006, AWS (Amazon Web Services) has grown into one of the world’s most comprehensive and widely adopted cloud ...

Slack Testing

Slack has become a fundamental tool for many organizations worldwide for enhancing collaboration and productivity across various ...