맨위로가기

소프트웨어 회귀

"오늘의AI위키"는 AI 기술로 일관성 있고 체계적인 최신 지식을 제공하는 혁신 플랫폼입니다.
"오늘의AI위키"의 AI를 통해 더욱 풍부하고 폭넓은 지식 경험을 누리세요.

1. 개요

소프트웨어 회귀는 소프트웨어 변경으로 인해 기존 기능이 제대로 작동하지 않거나 성능이 저하되는 현상을 의미한다. 회귀를 예방하고 감지하기 위해 개발자는 회귀 테스트, 성능 테스트를 수행하고, 코드 커밋 전에 깃 훅, 변경 영향 분석, 소프트웨어 린터를 활용한다. 회귀가 발생하면, 디버깅, 이분 탐색, 프로파일링, 로깅 등의 기법을 사용하여 근본 원인을 찾고, 기능적 회귀와 성능 회귀를 국소화한다.

더 읽어볼만한 페이지

  • 소프트웨어 버그 - 교착 상태
    교착 상태는 둘 이상의 프로세스가 자원을 점유하고 서로의 자원을 요청하여 더 이상 진행할 수 없는 상태를 의미하며, 상호 배제, 점유 대기, 비선점, 순환 대기 네 가지 조건이 모두 충족되어야 발생하고, 운영 체제는 이를 예방, 회피, 무시, 발견하는 방법으로 관리한다.
  • 소프트웨어 버그 - 글리치
    글리치는 예기치 않은 오작동이나 오류를 뜻하며, 전자 공학, 컴퓨터, 비디오 게임, 텔레비전 방송, 대중문화 등 다양한 분야에서 기능 실패, 오류, 그래픽 및 사운드 문제, 신호 오류 등의 이상 현상을 포괄적으로 지칭하는 용어이다.
소프트웨어 회귀
소프트웨어 회귀
유형소프트웨어 테스트
하위 유형소프트웨어 버그

2. 예방과 감지

소프트웨어 개발의 여러 단계에서 회귀가 발생하는 것을 방지하고, 발생한 회귀를 빠르게 감지하기 위한 기술들이 제안되어 왔다.

2. 1. 출시 이전

최종 사용자에게 릴리스되기 전에 개발자는 소프트웨어에 변경 사항이 적용된 후 회귀 테스트를 정기적으로 실행한다. 이러한 테스트에는 로컬 회귀를 포착하기 위한 단위 테스트와 원격 회귀를 포착하기 위한 통합 테스트가 포함된다.[47] 회귀 테스트는 종종 기존 테스트 케이스를 활용하여 만드는 데 수반되는 노력을 최소화한다.[48] 그러나 이러한 기존 테스트의 양으로 인해 테스트 케이스 우선 순위 지정과 같은 기술을 사용하여 대표적인 하위 집합을 선택해야 하는 경우가 많다.

성능 회귀를 감지하기 위해 소프트웨어 성능 테스트를 정기적으로 실행하여 후속 변경 후 소프트웨어의 응답 시간 및 자원 사용량 메트릭을 모니터링한다.[49] 기능 회귀 테스트와 달리 성능 테스트의 결과는 분산의 영향을 받는다. 즉, 성능 측정의 분산으로 인해 테스트 간에 결과가 다를 수 있다. 성능 수치의 변화와 최종 사용자의 요구에 따라 회귀에 해당하는지 여부를 결정해야 한다. 이 결정을 돕기 위해 통계적 가설 검정과 변화점 감지와 같은 접근 방식이 사용되기도 한다.[50]

2. 2. 커밋 이전

소프트웨어 회귀의 근본 원인을 디버깅하고 국소화하는 것은 비용이 많이 들 수 있기 때문에,[51][52] 애초에 회귀가 코드 저장소에 커밋되지 않도록 하는 몇 가지 방법들이 존재한다.

  • 훅을 사용하면 개발자가 코드 변경 사항을 커밋하거나 코드 리포지토리에 푸시하기 전에 테스트 스크립트를 실행할 수 있다.[53]
  • 코드 변경이 프로그램의 다양한 구성 요소에 미치는 영향을 예측하고, 테스트 케이스 선택 및 우선 순위 지정을 보완하기 위해 변경 영향 분석이 소프트웨어에 적용되었다.[54][55]
  • 소프트웨어 린터는 일관된 코딩 스타일을 보장하기 위해 커밋 훅에 추가되는 경우가 많아 소프트웨어가 회귀하기 쉬운 스타일 문제를 최소화한다.[56]

3. 국소화

발생한 회귀의 근본 원인을 찾고, 영향을 받는 범위를 좁히는 단계이다. 브레이크포인트 디버깅, 출력 디버깅, 프로그램 슬라이싱 등 비회귀 버그를 찾는 데 사용되는 기술들을 활용할 수 있다.

3. 1. 기능적 회귀

기능적 회귀를 찾아내기 위해 사용되는 일반적인 기술은 이분 탐색이다. 이는 버그가 있는 커밋과 이전에 작동했던 커밋을 모두 입력으로 받아 그 사이의 커밋에 대해 이진 검색을 수행하여 근본 원인을 찾으려고 시도한다.[57][16] 깃(Git)과 머큐리얼 같은 버전 관리 시스템은 주어진 커밋 쌍에 대해 이분 탐색을 수행할 수 있는 기능을 제공한다.[58][59][17][18]

다른 방법으로는 회귀 테스트 결과를 코드 변경과 직접 연관시키거나,[60][19] 분기 중단점을 설정하거나,[61][20] 코드 변경과 관련된 테스트 케이스(실패한 것을 포함)를 식별하는 증분 데이터 흐름 분석을 사용하는 것이 있다.[62][21]

3. 2. 성능 회귀

프로파일링은 프로그램의 다양한 구성 요소의 성능과 자원 사용량을 측정하며, 성능 문제 디버깅에 유용한 데이터를 생성하는 데 사용된다. 소프트웨어 성능 회귀의 맥락에서 개발자는 주로 버그가 있는 버전과 이전에 작동하던 버전 모두에 대해 프로파일러에서 생성된 호출 트리(타임라인이라고도 함)를 비교하며 이러한 비교를 단순화하는 메커니즘이 있다.[63] 웹 개발 도구는 일반적으로 개발자에게 이러한 성능 프로필을 기록할 수 있는 기능을 제공한다.[64][65]

로깅은 또한 성능 회귀 국소화에 도움이 되며, 호출 트리와 유사하게 개발자는 동일한 소프트웨어의 여러 버전에 대해 체계적으로 배치된 성능 로그를 비교할 수 있다.[66] 이러한 성능 로그를 추가할 때는 상충 관계가 존재하는데, 많은 로그를 추가하면 개발자가 소프트웨어의 어느 부분이 더 작은 단위에서 회귀하는지 정확히 찾아내는 데 도움이 될 수 있지만, 로그를 적게 추가하면 프로그램 실행 시 오버헤드가 감소하기 때문이다.[67] 이 외에도 국소화에 도움이 되는 성능 인식 단위 테스트 작성[68], 성능 카운터 편차를 기준으로 하위 시스템 순위 지정[69] 등의 방법이 있다. 또한 이분법은 성능 회귀에서 특정 기준 값 이하(또는 그 이상)를 수행하는 커밋을 버그가 있는 것으로 간주하고 이 비교 결과에 따라 커밋의 왼쪽 또는 오른쪽을 선택하는 방식으로 사용될 수 있다.

참조

[1] 서적 Proceedings of the Eighth International Symposium on Software Reliability Engineering (ISSRE 97) https://ieeexplore.i[...] IEEE 1997
[2] 간행물 Locating Regression Bugs https://link.springe[...] 2018-03-10
[3] 논문 Automated Detection of Performance Regressions Using Regression Models on Clustered Performance Counters https://sail.cs.quee[...] 2019-12-22
[4] 서적 The Testing Network: An Integral Approach to Test Activities in Large Software Projects Springer Science & Business Media 2008
[5] 서적 Ship It! A Practical Guide to Successful Software Projects https://archive.org/[...] The Pragmatic Bookshelf
[6] 서적 Proceedings of the International Conference on Software Maintenance https://ieeexplore.i[...] IEEE 1990-11
[7] 논문 Regression test selection for C++ software https://onlinelibrar[...] 2000
[8] 논문 Experience with performance testing of software systems: issues, an approach, and case study https://ieeexplore.i[...] 2000-12
[9] 서적 Proceedings of the International Conference on Performance Engineering https://dl.acm.org/d[...] Association for Computing Machinery 2020-04-20
[10] 서적 Proceedings of the Working Conference on Mining Software Repositories (MSR) https://ieeexplore.i[...] 2013-05
[11] 논문 Fault-localization techniques for software systems: a literature review https://dl.acm.org/d[...] 2014-09-17
[12] 웹사이트 Git - Git Hooks https://git-scm.com/[...] 2021-11-07
[13] 논문 Leveraging field data for impact analysis and regression testing https://dl.acm.org/d[...] 2003-09-01
[14] 서적 Proceedings of the International Conference on Software Maintenance https://ieeexplore.i[...] 2012-09
[15] 서적 Proceedings of the International Conference on Automated Software Engineering https://ieeexplore.i[...] 2017-10
[16] 서적 Proceedings of the International Workshop on Automatic Debugging https://ep.liu.se/en[...] Linkøping University Electronic Press 1997-09-10
[17] 웹사이트 Git - git-bisect Documentation https://git-scm.com/[...] 2021-11-07
[18] 웹사이트 hg - bisect https://www.selenic.[...] Mercurial 2021-11-07
[19] 웹사이트 Reading 11: Debugging https://web.mit.edu/[...] MIT
[20] 서적 Proceedings of the International Conference on Software Engineering: Companion Proceedings (ICSE-Companion) https://ieeexplore.i[...] 2019-05
[21] 서적 Proceedings of the Annual International Computer Software & Applications Conference https://ieeexplore.i[...] IEEE 1989-09
[22] 논문 Localizing software performance regressions in web applications by comparing execution timelines https://onlinelibrar[...] 2021
[23] 웹사이트 Analyze runtime performance https://developer.ch[...] Google 2021-11-07
[24] 웹사이트 Performance analysis reference - Microsoft Edge Development https://docs.microso[...] Microsoft 2021-11-07
[25] 서적 Proceedings of the International Conference on Performance Engineering https://dl.acm.org/d[...] Association for Computing Machinery 2018-03-30
[26] 논문 A Qualitative Study of the Benefits and Costs of Logging from Developers' Perspectives https://ieeexplore.i[...] 2020-01-30
[27] 서적 Proceedings of the International Conference on Performance Engineering https://dl.acm.org/d[...] Association for Computing Machinery 2013-04-21
[28] 서적 Proceedings of the International Symposium on Software Reliability Engineering https://ieeexplore.i[...] 2010-11
[29] 간행물 Locating Regression Bugs https://www.research[...] 2018-03-10
[30] 논문 Automated Detection of Performance Regressions Using Regression Models on Clustered Performance Counters https://sail.cs.quee[...] 2014-12-11
[31] 서적 Ship It! A Practical Guide to Successful Software Projects https://archive.org/[...] The Pragmatic Bookshelf
[32] 서적 Proceedings of the International Conference on Software Maintenance https://ieeexplore.i[...] IEEE 1990-11
[33] 논문 Regression test selection for C++ software https://onlinelibrar[...] 2000
[34] 논문 Experience with performance testing of software systems: issues, an approach, and case study https://ieeexplore.i[...] 2000-12
[35] 서적 Proceedings of the International Conference on Performance Engineering https://dl.acm.org/d[...] Association for Computing Machinery 2020-04-20
[36] 서적 Proceedings of the Working Conference on Mining Software Repositories (MSR) https://ieeexplore.i[...] 2013-05
[37] 저널 Fault-localization techniques for software systems: a literature review https://dl.acm.org/d[...] 2014-09-17
[38] 웹사이트 Git - Git Hooks https://git-scm.com/[...] 2021-11-07
[39] 저널 Leveraging field data for impact analysis and regression testing https://dl.acm.org/d[...] 2003-09-01
[40] 서적 Proceedings of the International Conference on Software Maintenance https://ieeexplore.i[...] 2012-09
[41] 서적 Proceedings of the International Conference on Automated Software Engineering https://ieeexplore.i[...] 2017-10
[42] 서적 Proceedings of the Eighth International Symposium on Software Reliability Engineering (ISSRE 97) https://ieeexplore.i[...] IEEE 1997
[43] 콘퍼런스 Locating Regression Bugs https://link.springe[...] 2018-03-10
[44] 저널 Automated Detection of Performance Regressions Using Regression Models on Clustered Performance Counters https://sail.cs.quee[...] 2014-12-11
[45] 서적 The Testing Network: An Integral Approach to Test Activities in Large Software Projects Springer Science & Business Media 2008
[46] 서적 Ship It! A Practical Guide to Successful Software Projects https://archive.org/[...] The Pragmatic Bookshelf
[47] 서적 Proceedings of the International Conference on Software Maintenance https://ieeexplore.i[...] IEEE 1990-11
[48] 저널 Regression test selection for C++ software https://onlinelibrar[...] 2000
[49] 저널 Experience with performance testing of software systems: issues, an approach, and case study https://ieeexplore.i[...] 2000-12
[50] 서적 Proceedings of the International Conference on Performance Engineering https://dl.acm.org/d[...] Association for Computing Machinery 2020-04-20
[51] 서적 Proceedings of the Working Conference on Mining Software Repositories (MSR) https://ieeexplore.i[...] 2013-05
[52] 저널 Fault-localization techniques for software systems: a literature review https://dl.acm.org/d[...] 2014-09-17
[53] 웹인용 Git - Git Hooks https://git-scm.com/[...] 2021-11-07
[54] 저널 Leveraging field data for impact analysis and regression testing https://dl.acm.org/d[...] 2003-09-01
[55] 서적 Proceedings of the International Conference on Software Maintenance https://ieeexplore.i[...] 2012-09
[56] 서적 Proceedings of the International Conference on Automated Software Engineering https://ieeexplore.i[...] 2017-10
[57] 서적 Proceedings of the International Workshop on Automatic Debugging https://ep.liu.se/en[...] Linkøping University Electronic Press 1997-09-10
[58] 웹인용 Git - git-bisect Documentation https://git-scm.com/[...] 2021-11-07
[59] 웹인용 hg - bisect https://www.selenic.[...] Mercurial 2021-11-07
[60] 웹인용 Reading 11: Debugging https://web.mit.edu/[...] MIT
[61] 서적 Proceedings of the International Conference on Software Engineering: Companion Proceedings (ICSE-Companion) https://ieeexplore.i[...] 2019-05
[62] 서적 Proceedings of the Annual International Computer Software & Applications Conference https://ieeexplore.i[...] IEEE 1989-09
[63] 저널 Localizing software performance regressions in web applications by comparing execution timelines https://onlinelibrar[...] 2021
[64] 웹인용 Analyze runtime performance https://developer.ch[...] Google 2021-11-07
[65] 웹인용 Performance analysis reference - Microsoft Edge Development https://docs.microso[...] Microsoft 2021-11-07
[66] 서적 Proceedings of the International Conference on Performance Engineering https://dl.acm.org/d[...] Association for Computing Machinery 2018-03-30
[67] 저널 A Qualitative Study of the Benefits and Costs of Logging from Developers' Perspectives https://ieeexplore.i[...] 2020-01-30
[68] 서적 Proceedings of the International Conference on Performance Engineering https://dl.acm.org/d[...] Association for Computing Machinery 2013-04-21
[69] 서적 Proceedings of the International Symposium on Software Reliability Engineering https://ieeexplore.i[...] 2010-11



본 사이트는 AI가 위키백과와 뉴스 기사,정부 간행물,학술 논문등을 바탕으로 정보를 가공하여 제공하는 백과사전형 서비스입니다.
모든 문서는 AI에 의해 자동 생성되며, CC BY-SA 4.0 라이선스에 따라 이용할 수 있습니다.
하지만, 위키백과나 뉴스 기사 자체에 오류, 부정확한 정보, 또는 가짜 뉴스가 포함될 수 있으며, AI는 이러한 내용을 완벽하게 걸러내지 못할 수 있습니다.
따라서 제공되는 정보에 일부 오류나 편향이 있을 수 있으므로, 중요한 정보는 반드시 다른 출처를 통해 교차 검증하시기 바랍니다.

문의하기 : help@durumis.com