Skip to content

Releases: thunderclient/thunder-client-support

v2.18.0

26 Feb 13:38
bdb1a26
Compare
Choose a tag to compare

New Features

  • Autocomplete Environment variables #151, #1194
  • Allow Skip Folder Option in Run Collection #1476
  • Skip Collection option in CLI for Run ALL Collections
  • Save Active Environment selection changes to local memory #1250, #448
  • Set a field Content Type in a Multi-Part Form Request #1482
  • Enable Resource field for OAuth Password grant type #1479
  • Clear URL Autocomplete History #1484
  • Update CLI to v1.12.0

Bug Fixes

  • Error when sending request: ENOENT: no such file or directory #1483

Autocomplete Environment Variables

  • The extension will automatically complete the environment variables as you start typing {{.
Screenshot 2024-02-26 at 12 36 56

Skip Folder in Run Collection

  • Now, you can use the Skip Folder option to skip multiple requests in the Run Collection view.
Screenshot 2024-02-26 at 12 47 41

Skip Collections in Run All

  • Now, you can skip collections when running all collections from the CLI.
  • e.g tc --col all --skip "ColA,ColB"

Active Environment Selection

  • Set Active Environment selection changes to local memory using the setting. This helps to avoid creating unnecessary Source Control activity.
Screenshot 2024-02-26 at 13 20 40

Set Field Content-Type

  • Set a field Content Type in a Multi-Part Form Request by appending content-type to the field names
Screenshot 2024-02-24 at 17 39 52

Clear URL Autocomplete History

  • You can clear the URL autocomplete history from the Request URL field.
Screenshot 2024-02-26 at 12 56 28

v2.17.5

03 Feb 13:48
7e14f3d
Compare
Choose a tag to compare

New Features

  • New await tc.retryRequest() function added to tc API
  • New DNS Test command added to Command Palette.
  • DNS resolve issues fixed for localhost
  • Update CLI to v1.11.6

Bug Fixes

  • Special characters get converted incorrectly in cURL import functionality #1472
  • JSON Schema for Schemavalidation gets Error in CI #1471

Retry Request Function:

  • New await tc.retryRequest() function added suitable for retrying same request when failed
  • Use example code below for retry request in Post Request script
let incrementCount = parseInt(tc.getVar('incrementCount') || "0");
let code = tc.response.status;

if(incrementCount <= 3 && code !== 200)
{
      incrementCount = incrementCount + 1
      tc.setVar('incrementCount', incrementCount)
      console.log("retrying request", incrementCount);

      await tc.delay(incrementCount * 1000); // exponential delay of 1 secs
      await tc.retryRequest();
}
else
{
  tc.setVar('incrementCount', 0);
  console.log("reset incrementCount = 0");
}

DNS Test command

  • use DNS Test command for localhost connection issues
Screenshot 2024-02-03 at 13 22 32

v2.17.2

31 Jan 16:19
66a8ced
Compare
Choose a tag to compare

New Features

  • Thunder client save file didn't use the filename in content-disposition #1272, #1458
  • HTML Report filter Failed requests option

Html Report Filter dropdown

Screenshot 2024-01-31 at 16 07 20

v2.17.0

03 Jan 18:11
5e18c11
Compare
Choose a tag to compare

New Features

  • Add Support For Responses Visualisation (Beta) #511
  • VS Code setting for default values for Request Headers #845
  • Allow to open multiple Run Collection tabs #1410
  • Consolidate iterations in reports to one table structure. #1412
  • Option to specify number of iterations from CLI #1411

Bug Fixes

  • Response color highlighting disappears after closing and reopening the editor tab #1438
  • Duplicate IDs in JSON after duplicating requests #1435
  • OAUTH2 Access token breaks on all versions higher that 2.14.1 #1439

Response Data Visualisation (Beta)

  • Create charts or tables from response using tc.chartHTML() from the Tests tab scripting
  • When you pass data to function tc.chartHTML(templace, data), the data is available in chart_data global variable
  • The feature is in Beta, please test and let us know feedback
var template = `
<script src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.7.8/handlebars.min.js"></script>

    <div id="output"></div>
    <script id="entry-template" type="text/x-handlebars-template">
          <div class="entry">
            <h2>{{first_name}}</h2>
            <div class="body">
              {{email}}
            </div>
          </div>
    </script>

    <script>
        var source = document.getElementById("entry-template").innerHTML;
        var template = Handlebars.compile(source);
    
        document.getElementById("output").innerHTML = template(chart_data[0]);
    </script>
`;

var data = tc.response.json.data;
tc.chartHTML(template, data);

Default Headers

  • You can now set default headers for requests using setting thunder-client.defaultHeaders
Screenshot 2024-01-03 at 16 39 43

v2.16.0

14 Nov 18:18
86e8ace
Compare
Choose a tag to compare

New Features

  • Import functions from other js files in Scripts #1401, #920
  • Skip individual requests option during collection run from Scripts #1402
  • Change default http library to Axios
  • Update CLI to v1.10.0

Bug Fixes

  • Automatically refresh the Auth token does not work. #1386

Import Functions from js files

  • Now you can import functions from other js files. Useful for code re-use and check-in to your git repo.
  • The path should be relative to workspace if you use Git-Sync, otherwise use full-path.
  • You can right click on the file and choose Copy Path or Copy Relative Path accordingly
// test-import.js file
function helloWorld(){
   return "hello world";
}

module.exports = {
  helloWorld
}
  • From request Inline script import js file using require
var {helloWorld} = require("thunder-tests/test-import.js");
var result = helloWorld();
console.log(result);
  • You can also save the path in the Environment variable, so you don't have to change the path in every request if you move the file to different folder.
var scriptPath = tc.getVar("scriptPath");
var {helloWorld} = require(scriptPath);
var result = helloWorld();
console.log(result);

Skip Request from Scripts

  • To skip request use the below function. Useful to control the execution order of the requests in Run Collection.
tc.skipRequest("requestId");

v2.15.3

09 Nov 14:07
8db54e8
Compare
Choose a tag to compare

Bug Fixes

  • Confusing icon to create activity, collection, and env variable #1391, #733
  • Connection refused for localhost #170
  • Undo / Redo is not working for german keyboard #1397, #1387
  • Performance slow on macOS #1398

v2.15.0

01 Nov 10:14
7eaea08
Compare
Choose a tag to compare

New Features

  • Run Collection Parallel #1088, #1363
  • Run Collection Skip request feature
  • Cookie Manager View #142
  • Get the current active environment name in the inline script? #1385
  • CLI - update to latest version v1.9.0

Bug Fixes

Run Collection Parallel (beta)

  • We are releasing a new feature to support running requests in collection concurrently.
  • You can configure no of concurrent requests to execute in parallel.
  • The feature is in beta, please test and let us know the feedback
  • CLI - use --concurrent switch. e.g: tc --col "colName" --concurrent 5
Screenshot 2023-11-01 at 08 11 10

Skip Request in Run Collection

  • Now you can skip request from execution in Run Collection
  • Works from Extention UI and CLI
Screenshot 2023-11-01 at 08 13 58

Cookie Manager (beta)

  • View all the cookies in Cookie Manager for the domains. You can delete single cookie or all cookies
  • Limitation: Currently you cannot create cookies from Cookie Manager, instead use the Cookie header
  • To view Cookie Manager:
    • From Sidebar View -> click ... and select Cookie Manager
    • From Command Palette -> search Cookie Manager
Screenshot 2023-11-01 at 08 21 09

v2.14.1

22 Oct 14:27
d9d0f20
Compare
Choose a tag to compare

New Features

  • Clear Cookies for select requests from scripting #1379
  • See updated tc API types file (v1.6.0)
  • Update CLI to v1.8.1

Bug Fixes

  • Fix - HTTP Headers (raw format) does not retain the unselected headers #1382

New API for Cookies

  • We are adding a new API to manage cookies from scripting

Get Cookies

// get all cookies in store
var list = await tc.getCookies();

// get all cookies for current url
var listDomain = await tc.getCookies("url");
var listDomain = await tc.getCookies(tc.request.url);

Clear Cookies

// clear all cookies in store
await tc.clearCookies();

// clear all cookies for current domain
await tc.clearCookies("url");
await tc.clearCookies(tc.request.url);

// clear single cookie by name of cookie
await tc.clearCookies(tc.request.url, "cookieName");

Set Cookie

// set cookie for current url
await tc.setCookie("https://www.thunderclient.com", "cookieName", "cookieValue");
await tc.setCookie(tc.request.url, "cookieName", "cookieValue");

v2.14.0

19 Oct 19:17
fa9edc1
Compare
Choose a tag to compare

New Features

  • Inline Scripting support #1026
  • Col & Request level env variables using scripting #823
  • CLI - Single report for test run with multiple collections #1221
  • chai expect, assert, and atob, btoa global variables added in scripting.
  • Update CLI to version v1.8.0

Bug Fixes

  • Cannot view/edit long environment variable values #1378
  • CLI - Pipeline job success if no collection is running #1376

Inline Scripting

  • We are introducing an inline scripting feature. Now you can use scripting for advanced use cases right inside Thunder Client views.
inline-scripting

Collection and Request Variables

  • Now you can use collection and request variables with request scope from the scripting
collection-variables

Global Variables

  • We added new global variables useful in scripting
  • Chai expect and assert functions are now global variables
  • atob and btoa are global variables useful for base64 encoding and decoding

OLD way to use chai library

const chai = require("chai");
var expect = chai.expect;
var assert = chai.assert;

 tc.test("Chai - Response code expect to be 200", function () {
        expect(tc.response.status).to.equal(200);
 })

NEW way of using global variables

 tc.test("Chai - Response code expect to be 200", function () {
        expect(tc.response.status).to.equal(200);
 })

New API for Cookies in v2.14.1

  • We are adding a new API to manage cookies from scripting

Get Cookies

// get all cookies in store
var list = await tc.getCookies();

// get all cookies for current url
var listDomain = await tc.getCookies("url");
var listDomain = await tc.getCookies(tc.request.url);

Clear Cookies

// clear all cookies in store
await tc.clearCookies();

// clear all cookies for current domain
await tc.clearCookies("url");
await tc.clearCookies(tc.request.url);

// clear single cookie by name of cookie
await tc.clearCookies(tc.request.url, "cookieName");

Set Cookie

// set cookie for current url
await tc.setCookie("https://www.thunderclient.com", "cookieName", "cookieValue");
await tc.setCookie(tc.request.url, "cookieName", "cookieValue");

Planning to Deprecate/Retire Features

Attach Env to Collection

  • How many users are using this feature? Now we have collection and request level variables using scripting, is the Attach Env to collection still useful?
  • Please let us know your feedback here
Screenshot 2023-10-19 at 19 37 38

v2.13.5

12 Oct 21:38
535b9f9
Compare
Choose a tag to compare

New Features

  • Collection and request names variables #904
    • Now you can use internal variables {{request_name}}, {{collection_name}} and {{folder_name}}
  • Update CLI to version v1.7.4

Bug Fixes

  • Incrementing an environment variable appears to have the environment file cached #1373