24 Eylül 2020 Perşembe

Regresyon Testi Nedir - Geriye Yönelik Test İle İşlevin Bozulmadığından Emin Olmak

Regresyon Testi neden Lazım?
Biraz daha kapsamlı test yaparak bizi istenmeyen durumlara karşı korur

1. İyileştirme Sonrasında Çıkan Hatalar
Müşterinin iki tane yedekli sistemi vardı. Bir iyileştirme istediler. İyileştirme geliştirildi, laboratuvarda test edildi, müşteri test ortamında test edildi ve canlı sistemlerden birisine kuruldu. Ancak bu aşamadan sonra problemler çıkmaya başladı. Güncellenen canlı sistem bazı girdileri işlememeye başladı. Güncellenmeye sistem ise doğru çalışıyordu. 

Daha sonra yapılan incelemede, sistemlere deneme amaçlı bir hot patch kurulduğu ancak güncellemenin bunları dahil etmediği anlaşıldı. Bundan sonra işler karışıyor. Hot patch bir daha incelendi ve yanlış kodlandığı anlaşıldı. Akla gelen seçenekler şöyle

1. iyileştirme + hot patch düzelmesini birlikte mi yüklemek lazım ?
2. yoksa sadece iyileştirmeyi yükleyip, hot patch hatasını müşteriye bildirmek mi lazım ?
3. müşterinin şikayeti yok, yanlış hot patch'i halının altına süpürmek mi lazım ?

Büyün bunlar nereden kaynaklanıyor ? Hot patch yüklenirken, hiç regression koşulmadığı için işlevin bozulmadığı test edilmemiş.

Regression Kelimesi
Tam Türkçe karşılığı yok. Zaten herkes regresyon diye kullanıyor."Geriye yönelik" anlamına geliyor sanırım.

Amacı Nedir?
Regresyon testi yeni eklenen bir yama, iyileştirme, hata gidermeden sonra eski testleri çalıştırarak işlevin bozulmadığını ve yeni hataların yazılımına girmediğini test etmek demek.

Aslında şu sorunun cevabını veriyor.
How to effectively work with teammates whose fixes to bugs cause more bugs?

Örnek
Bir örnek şöyle.
Often during software testing, some bugs are detected and a quick bug fix is carried out. Regression testing is executed in order to ensure that the bug fix didn’t cause any abruption in the application’s intended functionality. When some bugs are found to be occurring as a result of the bug fix, those are known as regression bugs. For example, let’s say your login page is having some errors and the developer fixed it. Now, the login page is working fine, but the registration page is causing some validation or other errors that did not exist earlier. The new error may have been caused because of the fix on the login page. This is a regression defect and it is relevant to deal with for delivering a more robust product in the market.
Regresyon Testi
Eski testleri çalıştırırken temel 2 yöntem seçilebilir.

1. Tüm testleri çalıştırmak. 

Bu yöntem maliyetli olabilir. Açıklaması şöyle.
This is the technique where test engineers execute all the existing test cases without missing any. This is quite expensive as it requires a huge amount of time and resources.
Bu yöntemle ilgili bir karikatür şöyle :)

2. Belli testleri çalıştırmak
Açıklaması şöyle.
In this technique, test engineers select a subset of test cases based on the impact analysis.
2.1 Belli Testlerin Seçilmesi
Burada en bu belli testlerin neye dayanarak seçildiği. Seçilen testler Regresssion Test Report'a kaydedilir.

Örneğin yama X hesaplaması için yapılmıştır. Bu durumda test gruplarına bakarak Hesaplama testleri grubundaki testleri koşmak mantıklı olabilir.

Örneğin yama kullanıcı doğrulaması için yapılmıştır. Bu durumda Login test grubundaki testleri koşmak mantıklı olabilir.

Sadece aklımıza gelenleri seçtik derse şüpheyle yaklaşmak gerekir.

2.1 Belli Testlerin Önceliklendirilmesi
Belli testleri çalıştırırken bir önceliklendirme yapmak gerekebilir. Şu 6 maddelik yöntem kullanılabilir.
Prioritize. A common heuristic is RCRCRC:

Recent: new features

Core: essential functionality of your product

Risk: risk is defined as the Probability of occurrence (how likely is it to happen) multiplied by the affect (what's the damage, in money hours lost or anything relevant), Risk hides under it a lot and can be calculated at different levels from module to system to environments.

Configuration sensitive: this represents both internal configuration and environment settings, for example the type of the device or operating system

Repaired: recently repaired bugs represents untested area

Chronic: some areas are known to be vulnerable. This can be due to complexity, the level of the developers or an area that falls in between responsibilities

Take your list of test cases and grade them for each item, let's say 1 - 5 (don't use zero since it will interfere with the next step), multiply then the six figure and sort by the result. This will give you a first estimation as to what should be tested first and why.




1 yorum:

  1. Yazilim corbasi adini gorunce sadece oyle istenildigi icin konuldugunu dusunmusutum. Icerigi okuyunca corba gibi oldugunu anladim. ama saglikli bi corba olmus kismen :)

    YanıtlaSil