Exploring Thunder Client: A Potential Alternative to Postman?
This article explains how to use the Visual Studio Code extension, Thunder Client, and its potential as a replacement for Postman.
Thunder Client has emerged as a popular extension for Visual Studio Code, especially for those involved in API testing. In this article, we'll delve into how to effectively use Thunder Client and evaluate whether it truly serves as a viable alternative to Postman.
What is Thunder Client?
Thunder Client is a tool that provides API client functionality as an extension for Visual Studio Code. Its main features include API testing, collections, test scripts, CI/CD integration, Git synchronization, and local storage. As a popular GUI API testing tool in VS Code, many users employ Thunder Client as an alternative to Postman.
Main Features of Thunder Client
Despite being a lightweight tool, Thunder Client has comprehensive API testing capabilities. For example:
- It has a GUI-based interface where you can set up API parameters, headers, bodies, and send requests.
- You can check response results directly in the GUI.
- It has built-in test functions without the need for scripts, allowing you to check response results against conditions.
- Requests can be organized into collections and executed in batches.
- It offers environment variable features, allowing you to prepare multiple sets of variables for different scenarios like testing and production.
- You can also import Postman's collection files for use.
So, for those who want to easily and quickly test APIs directly from VS Code during development, Thunder Client is a very appropriate tool.
How to Use Thunder Client
Let's go through how to test APIs from VS Code using Thunder Client and explain its main features clearly.
Installing Thunder Client
To use Thunder Client, you first need to install it as an extension in Visual Studio Code. Here are the steps:
- Open Visual Studio Code and click on 'Extensions' in the left menu.
- Type 'Thunder Client' in the search box at the top and press enter.
- Click on 'Thunder Client' in the search results and then click the 'Install' button.
Now, the Thunder Client extension can be installed on your computer.
Testing APIs with Thunder Client
Once Thunder Client is installed, its icon will appear in the VS Code sidebar. Clicking this icon allows you to start using Thunder Client.
Step 1: To begin API testing, click the 'New Request' button at the top of the screen.
Step 2: This will display the API settings screen where you can enter the HTTP method, API endpoint, and required parameters, then click the 'Send' button.
All sent requests will be displayed in the 'Activity' tab on the left.
Validating API Response Data in Thunder Client
After obtaining response data from the server, you can use Thunder Client's testing features to validate that response data.
In the API execution screen, click the 'Tests' tab to add validation conditions.
For example, as shown in the following image:
- The response code is 200,
- The response time is less than 500 milliseconds,
- The data format is JSON.
You can set conditions like these. When you click 'Send', the result of the response validation will be displayed in the panel on the far right.
Running Collections in Thunder Client
Like Postman, Thunder Client also supports running collections. You can add previously sent requests to a collection in the 'Activity' tab, or you can add new requests to a collection.
Thunder Client's collection execution feature allows you to send multiple requests in bulk but does not support more advanced testing features such as request grouping and conditional branching. For example, you cannot set up test automation by grouping requests or setting conditions.
Also, like Postman, there are limits to how many times you can run a collection. In the free version, you can only run it 30 times a month, just like Postman.
Can Thunder Client Replace Postman?
So, can the VS Code extension, Thunder Client, completely replace Postman? To conclude, Postman is a more specialized API testing tool and offers more advanced features, so Thunder Client cannot replace Postman for now. However, if you only need to send API requests directly from VS Code during API development, Thunder Client is convenient.
Next, I will introduce to you why Thunder Client can be inconvenient.
Mock Data
Firstly, Thunder Client cannot set up a mock server and therefore cannot handle the generation of mock data. In this way, when the API server is not ready, you cannot further advance the API development. On the other hand, Postman allows you to set up a mock server.
However, there are also certain limitations to Postman's mock server feature. You need to refer to the API definition document in Postman to set up a mock server and manually define the data it returns. Moreover, you cannot associate the mock server you set up with the API, so even if the mock server returns the data you defined accurately, you cannot guarantee that the API will work correctly.
Therefore, EchoAPI, a more powerful API testing tool than Postman, allows you to use a mock server directly from the API definition document, eliminating the need for additional mock server setup.
Advanced Testing and Test Automation
In Thunder Client, you can execute multiple requests in bulk by adding them to the same collection, but you cannot use advanced testing features such as request grouping and conditional branching. In contrast, Postman allows you to use collections and its flow feature to set various conditions for test steps, making API test automation easier.
Also, EchoAPI is a more user-friendly tool for facilitating advanced API testing and test automation. Since Postman's collection and flow features are separate, data integration between collections and flows is almost impossible. In contrast, EchoAPI's scenario testing allows you to intuitively add test steps in the GUI or apply various conditions to steps, making it very convenient.
Collaboration is Inconvenient
If you are developing APIs in a team, Thunder Client is very inconvenient. Thunder Client does not have an account system, so you cannot develop with other members or share API data with other team members. On the other hand, Postman has a team collaboration feature, so if you are in the same team, any changes to the API data will be seamlessly reflected in other members.
Additionally, EchoAPI has a collaboration feature similar to Postman. If there are any changes in the project, they will be seamlessly synchronized to all members.
Rising Star: EchoAPI
EchoAPI is an ultra-lightweight collaboration tool for API development that supports Scratch Pad. It's a perfect alternative to Postman, offering features like API design, debugging, automated testing, and load testing. Plus, it comes with plugins for IntelliJ IDEA(EchoAPI for IntelliJ IDEA), extension for VS Code(EchoAPI for VS Code), and a Chrome request capture extension(EchoAPI Interceptor), all without the need to log in.
It can be said that EchoAPI for VSCode is currently the best extension for Visual Studio Code and the best alternative to Postman. The EchoAPI team has also promised that EchoAPI will be free for personal use forever.
Main Features of EchoAPI for VSCode?
- No login required
- Supports Postman Scratch Pad
- Ultra lightweight
- 100% compatible with Postman script syntax
Conclusion
This article explains how to use Thunder Client, a Visual Studio Code extension, and its potential as a replacement for Postman.
Thunder Client is a GUI-based API testing extension that can perform basic functions necessary for API testing, such as validating response results and executing multiple requests in bulk. However, it lacks advanced features compared to Postman and has limitations in setting up mock servers, test automation, and collaboration. Therefore, while it is convenient for simple API request sending, Postman is more suitable as a comprehensive API testing tool.
Also, for serious API testing or development that emphasizes collaboration, EchoAPI can be a strong alternative to Postman. EchoAPI is more user-friendly than Postman and allows for easier advanced API testing.
But,if you're used to Thunder Client and it meets your daily work needs, but you're frustrated with features locked behind a paywall, you can use EchoAPI for VSCode. It's a completely free extension that's even better than Thunder Client.