NgenTest -Test Case Generation

Vignesh Ravichandran

--

Framework Used:
Jasmine and Karma with Angular

Purpose Used:
To generate Unit test cases

Methodology to be followed:
1.use the command to install ngentest to your project

npm install ngentest

2.then to generate a spec file for the code written in your component.ts

ngentest app.component.ts -s

the main point to note is that, the last command has to be done inside of your component’s main folder in your terminal and not under your project’s main folder

3.Incase if you already have a spec file then we can use the same command without -s suffix,

ngentest app.component.ts

then the test contents will be generated in the terminal, which we can later paste them to our file

Common Errors:

invalid ts file
The error that most of us might encounter is with the path setting. So please ensure that the command is entered at the correct file path

Npm Page:
https://www.npmjs.com/package/ngentest

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Vignesh Ravichandran
Vignesh Ravichandran

Written by Vignesh Ravichandran

Software Development Engineer with skills in Problem solving, Java Programming, Angular, Spring boot, Docker, Podman. www.youtube.com/@vigneshravichandran3096

No responses yet

Write a response