# Using visual studio code to write tests

**URL:** <https://community.postman.com/t/using-visual-studio-code-to-write-tests/4257>\
**Category:** Help Hub\
**Tags:** testing\
**Created:** [February 22, 2019, 2:34pm UTC](https://community.postman.com/t/using-visual-studio-code-to-write-tests/4257 "2019-02-22T14:34:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![salilbhole](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/salilbhole/32/1369_2.png) [@salilbhole](https://community.postman.com/u/salilbhole)\
**Post date:** [February 22, 2019, 2:34pm UTC](https://community.postman.com/t/using-visual-studio-code-to-write-tests/4257/1 "2019-02-22T14:34:01Z")

</div>

What postman java-script libraries I need to import to write my tests using visual studio code.

Thanks,

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [February 22, 2019, 4:30pm UTC](https://community.postman.com/t/using-visual-studio-code-to-write-tests/4257/2 "2019-02-22T16:30:42Z")

</div>

Would you be able to provide more context?

---

<div class="post-metadata">

**Author:** ![salilbhole](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/salilbhole/32/1369_2.png) [@salilbhole](https://community.postman.com/u/salilbhole)\
**Post date:** [February 22, 2019, 6:29pm UTC](https://community.postman.com/t/using-visual-studio-code-to-write-tests/4257/3 "2019-02-22T18:29:34Z")

</div>

Sure Danny,  
Rather than writing my javascript code in postman “Tests” tab, I want to write my initial code in VS code for my tests taking advantage of code completion (intellisense), e.g. when I type pm, I want to know what all the members of pm object, properties, methods etc. Once I am satisfied with the code then I can copy & paste it in the “Tests” tab to run.  
Hope that helps.  
Thanks,

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [February 22, 2019, 6:36pm UTC](https://community.postman.com/t/using-visual-studio-code-to-write-tests/4257/4 "2019-02-22T18:36:12Z")

</div>

I might be wrong but I just don’t think it’s going to work like that in VSCode - the `pm.*` API within the application only really has a handful of options available to you anyway.

[https://learning.getpostman.com/docs/postman/scripts/postman\_sandbox\_api\_reference/](https://learning.getpostman.com/docs/postman/scripts/postman_sandbox_api_reference/)

I’m very interested in your approach, if you can get something working in VSCode - I think having an auto complete function, on the `pm.*` API, within the application would help a lot with this but it’s just not there yet.

Also, it might only save you a little bit of time as you would need to copy everything back into the application, to run the test and know if you have the syntax right or not.

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [February 22, 2019, 6:49pm UTC](https://community.postman.com/t/using-visual-studio-code-to-write-tests/4257/5 "2019-02-22T18:49:08Z")

</div>

In terms of VSCode - This looks interesting though:

[https://marketplace.visualstudio.com/items?itemName=eridem.vscode-postman](https://marketplace.visualstudio.com/items?itemName=eridem.vscode-postman)

Under the hood its just using Newman to run the collections but it’s still actually quite cool.

---

<div class="post-metadata">

**Author:** ![salilbhole](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/salilbhole/32/1369_2.png) [@salilbhole](https://community.postman.com/u/salilbhole)\
**Post date:** [February 22, 2019, 7:02pm UTC](https://community.postman.com/t/using-visual-studio-code-to-write-tests/4257/6 "2019-02-22T19:02:00Z")

</div>

Yeah, that one is pretty cool, I downloaded that earlier. I found this but looks quite old,  
[https://www.npmjs.com/package/postman](https://www.npmjs.com/package/postman). Anyway thanks for your help.

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [February 22, 2019, 7:05pm UTC](https://community.postman.com/t/using-visual-studio-code-to-write-tests/4257/7 "2019-02-22T19:05:43Z")

</div>

Sorry I couldn’t assist you more 😔

I don’t believe that the package you referred to has anything to do with this Postman. That shares the same name but feels more that a message bus than a REST client.
