Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Kentan - The Conductor For Your Test Data

Kentan - The Conductor For Your Test Data

This talk was given at https://www.meetup.com/de-DE/FrankenJS/events/254442565/.
It introduces you to the feature set of Kentan.

Kentan allows you to organize your test data.
Additionally, this library comes with built-in support for Angular CLI projects.

Documentation: https://kentan-official.github.com/kentan

Gregor Woiwode

September 20, 2018
Tweet

More Decks by Gregor Woiwode

Other Decks in Programming

Transcript

  1. Model Sketch export interface Product { id: number; title: string;

    description: string; priceInDollars: number; }
  2. Sketch import { Sketch } from '@kentan-official/core'; import { Product

    } from '@models/product'; export class ForProduct extends Sketch<Product> { constructor() { super({ id: 1, title: 'XBox One‘, description: 'Gaming Console‘, priceInDollars: 300 }); } }
  3. Sketch import { Sketch } from '@kentan-official/core'; import { Product

    } from '@models/product'; export class ForProduct extends Sketch<Product> { constructor() { super({ id: 1, title: 'XBox One‘, description: 'Gaming Console‘, priceInDollars: 300 }); } }
  4. Sketch import { Sketch } from '@kentan-official/core'; import { Product

    } from '@models/product'; export class ForProduct extends Sketch<Product> { constructor() { super({ id: 1, title: 'XBox One‘, description: 'Gaming Console‘, priceInDollars: 300 }); } }
  5. Sketch import { Sketch } from '@kentan-official/core'; import { Product

    } from '@models/product'; export class ForProduct extends Sketch<Product> { constructor() { super({ id: 1, title: 'XBox One', description: 'Gaming Console', priceInDollars: 300 }); } }
  6. Test SKETCH describe('Product', () => { describe('When a price is

    given', () => { it('should yield the actual price', () => { const givenPrice = 300; const product = Kentan.sketch(ForProduct).model(); expect(product.priceInDollars).toBe(givenPrice); }); }); });
  7. Test SKETCH describe('Product', () => { describe('When a price is

    given', () => { it('should yield the actual price', () => { const givenPrice = 300; const product = Kentan.sketch(ForProduct).model(); expect(product.priceInDollars).toBe(givenPrice); }); }); });
  8. Test SKETCH describe('Product', () => { describe('When a price is

    given', () => { it('should yield the actual price', () => { const givenPrice = 300; const product = Kentan.sketch(ForProduct).model(); expect(product.priceInDollars).toBe(givenPrice); }); }); });
  9. Test SKETCH describe('Product', () => { describe('When a price is

    given', () => { it('should yield the actual price', () => { const givenPrice = 300; const product = Kentan.sketch(ForProduct).model(); expect(product.priceInDollars).toBe(givenPrice); }); }); });
  10. +

  11. Summary KENTAN Sketch creates reusable test data Generator builds configurable

    Sketch-Lists Helpers configure Sketches Tooling for Angular generating Sketchs automatically