question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AssignVariables - While conversion it is adding additional character ( ? )in the test due to which tests are failing. - Bug

See original GitHub issue

Snippet of portman config - "assignVariables": [ { "openApiOperationId": "createOrg", "collectionVariables": [ { "responseBodyProp": "id", "name": "createOrg.id" } ] } ],

Postman collection test snippet:

// pm.collectionVariables - Set createOrg.id as variable for jsonData.id

if (jsonData?.id) {
   pm.collectionVariables.set("createOrg.id", jsonData.id);
   console.log("- use {{createOrg.id}} as collection variable for value",jsonData.id);
} else {
   console.log('INFO - Unable to assign variable {{createOrg.id}}, as jsonData.id is undefined.');
};

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
yajiv789commented, Dec 6, 2021

@thim81 Thanks alot for your prompt responses and quick turn around with fix.

0reactions
thim81commented, Dec 4, 2021

@yajiv789 We just released 1.10.2, which should fix your issue reported.

If you are using a Node version, lower than Node 14, Portman will not use “optional chaining” in the generated Postman collection.

Given that Node 12 is in maintenance mode until mid 2022, the tip is to start using at least Node 14 or higher. https://nodejs.org/en/about/releases/

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Advanced googletest Topics
This document will show you more assertions as well as how to construct complex failure messages, propagate fatal failures, reuse and speed up...
Read more >
Keyword Test Variables | TestComplete Documentation
To assign values to variables in keyword tests, you use the Set Variable ... Click Finish to close the dialog and add a...
Read more >
BuiltIn - Robot Framework
Using variables with keywords creating or accessing variables. This library has special keywords Set Global Variable, Set Suite Variable, Set ...
Read more >
Unit test reports - GitLab Docs
Introduced in GitLab 15.2. You can copy the name and path of failed tests when there are failed tests listed in the Test...
Read more >
Troubleshoot pipeline runs - Azure DevOps - Microsoft Learn
Pipeline won't trigger · Pipeline queues but never gets an agent · Pipeline fails to complete · Get logs to diagnose problems ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found