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

Kentan - A Modular Test Data Composer

Kentan - A Modular Test Data Composer

Kentan allows you to create, organize and compose test data. Once this is done it simplifies your test arrangements. Gregor created it to avoid boring test setup on every new project. In this talk, we'll see what is Kentan and how it can make our life easier.

Gregor Woiwode

September 04, 2018
Tweet

More Decks by Gregor Woiwode

Other Decks in Programming

Transcript

  1. Setup 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. Configure 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. Configure 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. Configure 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. Configure 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