# Scratching head - Just want to display value of variable on Test Results using new pm

**URL:** <https://community.postman.com/t/scratching-head-just-want-to-display-value-of-variable-on-test-results-using-new-pm/1184>\
**Category:** Help Hub\
**Created:** [March 8, 2018, 10:25pm UTC](https://community.postman.com/t/scratching-head-just-want-to-display-value-of-variable-on-test-results-using-new-pm/1184 "2018-03-08T22:25:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anne.demata](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@anne.demata](https://community.postman.com/u/anne.demata)\
**Post date:** [March 8, 2018, 10:25pm UTC](https://community.postman.com/t/scratching-head-just-want-to-display-value-of-variable-on-test-results-using-new-pm/1184/1 "2018-03-08T22:25:29Z")

</div>

Hi,

I want to display the value of my Account variable on the Test Results tab.  
I was able to do this with this statement:  
tests[postman.getGlobalVariable(“Account”)] = true;

I can’t seem to figure out how to write the same thing using the new set of test APIs (pm.)

Thanks,  
Anne

---

<div class="post-metadata">

**Author:** ![dhoyt](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/dhoyt/32/238_2.png) [@dhoyt](https://community.postman.com/u/dhoyt)\
**Post date:** [March 9, 2018, 1:28pm UTC](https://community.postman.com/t/scratching-head-just-want-to-display-value-of-variable-on-test-results-using-new-pm/1184/2 "2018-03-09T13:28:20Z")

</div>

@anne.demata

Did you try this ?

```javascript
tests[pm.globals.get(“Account”)] = true;

```

---

<div class="post-metadata">

**Author:** ![vdespa](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/vdespa/32/2770_2.png) [@vdespa](https://community.postman.com/u/vdespa)\
**Post date:** [March 9, 2018, 9:40pm UTC](https://community.postman.com/t/scratching-head-just-want-to-display-value-of-variable-on-test-results-using-new-pm/1184/4 "2018-03-09T21:40:31Z")

</div>

Have you tried something like:

```
pm.test(pm.globals.get("Account"), function () {
    // your tests here
});

```

or

```
pm.test(`Test - ${pm.globals.get("Account")}`, function () {
    // your tests here
});
```

---

<div class="post-metadata">

**Author:** ![anne.demata](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@anne.demata](https://community.postman.com/u/anne.demata)\
**Post date:** [March 19, 2018, 9:18pm UTC](https://community.postman.com/t/scratching-head-just-want-to-display-value-of-variable-on-test-results-using-new-pm/1184/5 "2018-03-19T21:18:51Z")

</div>

Thank you, dhoyt and vdespa!!! And sorry I was not able to reply sooner.

I ended up using this format: pm.test(`Test - ${pm.globals.get("Account")}`, function () {  
// your tests here  
});

If I just want to display the value without any additional tests, I put a true condition under //your tests here. Something like 1 === 1; 😃
