Skip to content

yong362/Web-Development

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Unit Test ##Installation This project is build based on Node.js
npm install to install package, if having error of installing package please install each package manually
npm install moment
npm install request
npm install walk
npm install fs
npm install xml2js
npm install path
npm install form-data
npm install json2xls
npm install exceljs
npm install msexcel-builder
npm http-server -g ##Usage Running the code below will allows you to read run the unit test, reading the result from the designated folder and sending the unit test result to the database.
To run Unit Test
jasmine-node --junitreport [location of file] --output [location to save unit test report]
E.g. jasmine-node --junitreport test/spec/MainTest_spec.js --output ./reports/

Running the code below allows you to generate a excel spreadsheet from the RAML. This excel spreadsheet helps tester to keep track of the test cases that they have created afterwhich upload to the database to notify other tester of which API test cases had been created. This allow reduction of miscomunication and reduce the chances of duplicated codes.
To run generate excel file from raml
node [location of file]
E.g. node test\spec\Raml2excel.js

Running the code below allows you to run the website on you own local machine. This is good for those developers who are intending to modify the UI. To run local server
http-server
E.g. http-server ##Modification of codes

To create a test cases
Start with `frisby.create` with a description of the test followed by one of `get`, `post`, `put`, `delete`, or `head`, and ending with `run` to generate the resulting jasmine spec test. There is a `expectStatus` method built in to more easily test HTTP status codes. Any other jasmine `expect` tests should be done inside the `after` callback.

Each set of unique sequences or API endpoint tests should be started with new frisby.toss method calls instead of trying to chain multiple HTTP requests together.

For more infomation regarding how to create test cases using frisby
https://github.com/vlucas/frisby

Make sure your save location of unit test report are match to the output when you are running the test
To modify the location of the save output location
var walker = walk.walk('the location where you want to save report to', { followLinks: false });
By default the report will be save in ./reports

Raml2excel.js
As for Raml2excel.js, most of the documentation is located in the JavaScript itself.
For more information for those codes
raml-parser - https://github.com/raml-org/raml-js-parser
exceljs - https://github.com/guyonroche/exceljs#reading-xlsx
msexcel-builder - https://github.com/chuanyi/msexcel-builder

About

Creation of deployment app for e-commerce

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published