Yazılım İngilizcesi · Yazılım Testi

Assertion ne demek?

Yazılımda anlamı, Türkçe karşılığı ve örnek cümleler

/əˈsɜːrʃn/isimSık kullanılan terim

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

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

  2. 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

Aynı konudan: Yazılım Testi

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: