Meta Refresh 2015: Delhi Run-up

Data-centric mobile web design

Participate Propose a session

How to automatically generate test for your JavaScript file

Submitted by saptarshi chatterjee (@sapy) on Tuesday, 10 March 2015

Technical level: Advanced

View proposal in schedule

Abstract

Automate testcase file generation for javaScript .Generates Jasmine test for your angularJs file, Most of these auto generated custom test cases will actually be passing and it will take file’s code coverage from 0% to 40%-50% without writing a single line of code, ain’t that freaking awesome!!!

Outline

AngularJS test generator. It’s an yeoman generator. Generates customized Jasmine test for your angularJs file [Right now only works for controllers . test generator for directives and services are under construction…]

[x] Takes path of the angularJs file to be tested as input. [x] Parses the file and generates a test file. [x] Be ready for surprise - you will be amazed to see that most of these auto generated test are actually passing , and you need to edit rest, to make them pass (Obviously ). [x] this auto generated test file takes your code coverage for that file from 0% to 40-50% without writing a single line of code . Now that’s Freaking awesome!!!

Requirements

Laptops and wifi.

Speaker bio

Links

Comments

Login with Twitter or Google to leave a comment