Frisby.js

Frisby is another tool which is used in Testing, actually it is for API testing. It is based on node.js and jasmine. Jasmine is an open source testing framework for java script. Before work with Frisby.js, let’s see how to install it on your Linux machine.

  • npm should be there to install Frisby. So first let’s install npm.

0

  • Next we should check whether we have the node.js or not.

1

  • If it’s there, the output looks similar to this.

2

  • Then we can install Frisby.

4

5.png

  • There will be a file ‘node_modules‘ at your installation directory.

6

  • As Frisby has built on top of Jasmine, we have to install jasmine as well.

7

8

  • Then we need to create a symbolic link like following.

10

  • Now everything is setup for running your Frisby script. Name the file according to the naming conversions. As this is based on Java Script, the extension should be ‘.js‘. Also we should append the ‘_spec‘ at the end of the file name. So the file name must be something like,

    fileName_spec.js

12

Then write this code.

13

Using ‘jasmine-node file_name‘ command we can execute the code. The result will be something like this for a Failure scenario.

11

  • Also we can generate test reports using the jasmine-node module using it’s  ‘–junitreport‘ parameter.

14

Generated report files will be inside the ‘reports‘ directory.

15

Generated report ‘.xml‘ file.

16

Now you know how to install Frisby.js on your machine and how to execute a test successfully. From the next post we will see how to write test cases for API automation. Thank You!

Advertisements

3 thoughts on “Frisby.js

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s