Thunder Client is a lightweight Rest API Client Extension for VS Code.
chai
module is now included in the extension, no need to download externally - #1313v1.5.2
Example Code
var chai = require("chai");
var expect = chai.expect;
var assert = chai.assert;
function testChaiFilter() {
tc.test("Response code is 200", function () {
assert.equal(tc.response.status, 200)
})
tc.test("Response code expect to be 200", function () {
expect(tc.response.status).to.equal(200);
})
}
module.exports = [testChaiFilter]
Id
in tc object - #1298tc.setParam
new function added to tc object to set query parameter #1303removeSpaces
new built-in filter addedunique
built-in filter added1.5.0
Today we are releasing a new feature: Test assertions using scripting. Developers can now use scripting to write assertions, based on the use case you can choose a scripting or GUI interface for assertions.
tc.test()
added to tc object useful for assertions #465, #194, #347Post Request Filter
in Tests
tab1.4.0
v1.4.6
function testFilter() {
let success = tc.response.status == 200;
let json = tc.response.json;
let containsThunder = json.message?.includes("thunder");
tc.test("Response code is 200", success);
tc.test("Response contains thunder word", containsThunder);
// Assertions using function syntax
tc.test("verifying multiple tests", function () {
let success = tc.response.status == 200;
let time = tc.response.time < 1000;
return success && time;
});
}
module.exports = [testFilter]
// using built-in node assert module
const assert = require("assert");
function testFilter() {
console.log("test assertion filter");
tc.test("Response code is 200", function () {
assert.equal(tc.response.status, 200);
})
}
module.exports = [testFilter]
var chai = require("chai");
var expect = chai.expect;
var assert = chai.assert;
function testChaiFilter() {
tc.test("Response code is 200", function () {
assert.equal(tc.response.status, 200)
})
tc.test("Response code expect to be 200", function () {
expect(tc.response.status).to.equal(200);
})
}
module.exports = [testChaiFilter]
--reqlist
will accept request name or id #1234v1.4.6
base64
format #11251.3.1
1.4.5
subtract
built in filter not working correctly #1225multi-root workspaces
#731, #1169, #1139, #574await tc.runRequest("reqId")
to tc
object in scripts #1199after Tests
performed #1158Html report
in CLI #1126--log
for "col", "fol" or "reqlist" with TC CLI #1070, #1165Auto Update
CLI to the latest version--var-data
parameter to pass Env variables data in CLI #1184tc --debug
v1.4.2
- npm i -g @thunderclient/cli
.yml
file extension #1212tc-types.d.ts
to v1.3.0
async function testReq(){
var result = await tc.runRequest("reqId");
console.log(result);
}
module.exports = [testReq]
=, !=, <=, <, >=, >, *=, ^=, $=
*=
performs contains
operation^=
performs startsWith
operation$=
performs endsWith
operationSeparate Collections & Environments
to different files #574, #1035Autocomplete
for recent endpoints in URL field #1192refresh
request Header #1203Sidebar Hide Date Modified
to Sidebar Layout
#577npm i -g @thunderclient/cli
separate files
for each collection and environment._db-backup
, in case you need them.1.2.3
npm i -g @thunderclient/cli
The extension was free for the last 2 years, but to support the development and operational costs, we have to start charging businesses.
We are launching subscription plans for businesses.
monthly
or $3 per user/month billed yearly
monthly
or $7 per user/month billed yearly
yearly