Assertion ne demek?
Yazılımda anlamı, Türkçe karşılığı ve örnek cümleler
Assertion, yazılımda doğrulama ifadesi, beklenti kontrolü, assertion anlamına gelir.
Bir testte sonucun beklenen değerle eşleşip eşleşmediğini kontrol eden satır. Kontrol yanlış çıkarsa test başarısız olur.
English: A line in a test that checks whether a result matches the expected value. If the check is false, the test fails.
Nerede ve nasıl kullanılır?
assertEquals, expect(...).toBe(...) ya da Python'daki assert gibi yapılarla yazılır. Bir test çok az şey kontrol ediyorsa inceleyenler 'a stronger assertion' ister. Çıktıdaki 'Assertion failed' veya 'AssertionError', hangi kontrolün bozulduğunu gösterir. Türk ekiplerde 'assert' ya da 'assertion' denir.
Örnek cümleler
This test has no assertions, so it passes even when the function returns garbage.
Bu testte hiç assertion yok; fonksiyon saçma bir değer döndürse bile geçiyor.
Add an assertion for the error message, not just for the status code.
Sadece durum kodu için değil, hata mesajı için de bir assertion ekle.
Sık kullanılan kalıplar
- add an assertion
- the assertion fails
- assertion error
- a stronger assertion
İlgili terimler
Aynı konudan: Yazılım Testi
- edge case · uç durum
- QA · kalite güvencesi
- regression · gerileme
- integration test · entegrasyon testi
- test coverage · test kapsamı
- end-to-end test · uçtan uca test
- flaky · kararsız
- manual testing · manuel test
- automated testing · otomatik test
- smoke test · duman testi
- happy path · sorunsuz senaryo
- TDD · test güdümlü geliştirme
Seviyene uygun okumayla pekiştir
Yeni kelimelerin kalıcı olmasının en hızlı yolu seviyene uygun metin okumaktır. Seviyene göre ücretsiz İngilizce kitaplar:
