Unit Test

Tests are executable documentation.

Unit Test

Integration Test

UI Test

Kodu küçük parçalar olarak ele alır ve çalışabilirliğini test eder.

Küçük parçaların bir araya gelerek oluşturduğu yapıların çalıştığından emin olur.

Browser otomasyonu ile arayüzü test eder.

Jest, Jasmine ve Mocha

Selenium, Cypress.io

Jest ile yazılmış basit bir test

import TurkishLetter from '../../src/scripts/common/turkish-letter';

describe("TurkishLetter class'ı", function(){
    let turkishLetter;
    
    beforeEach(function(){
        turkishLetter = new TurkishLetter();
    });

    it("Türkçe büyük harfleri küçük harf yapabilmeli", function(){
        expect(turkishLetter.toLower("İIŞĞÜÖÇ")).toBe("iışğüöç");
    });

    it("Türkçe küçük harfleri büyük harf yapabilmeli", function(){
        expect(turkishLetter.toUpper("iışğüöç")).toBe("İIŞĞÜÖÇ");
    });
});

Title Text

Integration testlere neden ihtiyaç var?

Unit Test

By Tufan Tunç

Unit Test

  • 66