소프트웨어 회귀
Software regression소프트웨어 회귀는 이전에 작동하던 기능이 작동을 중지하는 소프트웨어 버그의 일종입니다.이 문제는 소프트웨어의 소스 코드에 새로운 기능과 버그 [1]수정을 추가하는 등 변경이 적용된 후에 발생할 수 있습니다.시스템 업그레이드, 시스템 패치 적용, 서머타임 [2]변경 등 소프트웨어가 가동되고 있는 환경의 변경에 의해서도 도입될 가능성이 있습니다.소프트웨어 성능 회귀란 소프트웨어가 여전히 올바르게 작동하지만 이전보다 더 느리게 [3]수행되거나 더 많은 메모리 또는 리소스를 사용하는 상황을 말합니다.실제로 다음과 [4]같은 다양한 유형의 소프트웨어 퇴행이 확인되었습니다.
- 로컬 – 변경 시 변경된 모듈 또는 컴포넌트에 새로운 버그가 발생합니다.
- 원격 – 소프트웨어 일부를 변경하면 다른 모듈 또는 컴포넌트의 기능이 손상됩니다.
- 마스크 해제 – 변경 전에 효과가 없었던 기존 버그의 마스크가 해제됩니다.
퇴행은 소프트웨어 패치에 포함된 버그 수정에 의해 자주 발생합니다.이러한 문제를 피하기 위한 한 가지 방법은 회귀 테스트입니다.적절하게 설계된 테스트 계획은 소프트웨어를 [5]출시하기 전에 이러한 가능성을 방지하는 것을 목적으로 합니다.자동화된 테스트와 잘 작성된 테스트 사례를 통해 회귀 가능성을 줄일 수 있습니다.
예방 및 검출
이하와 같이, 개발의 다양한 단계에서 소프트웨어에 퇴행하는 것을 막기 위한 기술이 제안되고 있습니다.
발매 전
릴리스 후 최종 사용자에게 퇴행 현상이 나타나지 않도록 소프트웨어 변경 후 개발자가 정기적으로 퇴행 테스트를 수행합니다.이러한 테스트에는 로컬 회귀를 포착하는 단위 테스트와 원격 [6]회귀를 포착하는 통합 테스트가 포함될 수 있습니다.회귀 테스트 기법은 기존 테스트 케이스를 활용하여 테스트 [7]케이스를 작성하는 작업을 최소화하는 경우가 많습니다.그러나 이러한 기존 테스트의 양으로 인해 종종 테스트 케이스 우선순위 부여와 같은 기법을 사용하여 대표적인 서브셋을 선택해야 합니다.
성능 저하를 감지하기 위해 소프트웨어 성능 테스트를 정기적으로 실행하여 이후 변경 [8]후 소프트웨어의 응답 시간 및 리소스 사용 메트릭을 모니터링합니다.기능적 회귀 테스트와 달리 성능 테스트 결과는 분산될 수 있습니다. 즉, 성능 측정값의 변동으로 인해 테스트마다 결과가 다를 수 있습니다. 그 결과 성능 수치 변화가 경험과 최종 사용자의 요구에 따라 회귀를 구성하는지 여부를 결정해야 합니다.통계적 유의성 테스트 및 변화점 검출과 같은 접근방식이 이 [9]결정에 도움이 되는 경우가 있다.
커밋 전
소프트웨어 회귀의 근본 원인을 디버깅하고 현지화하는 데 비용이 [10][11]많이 들 수 있기 때문에 처음부터 회귀가 코드 저장소에 커밋되지 않도록 하는 방법도 있습니다.예를 들어, Git Hooks를 통해 개발자는 코드 변경이 커밋되거나 코드 [12]저장소에 푸시되기 전에 테스트 스크립트를 실행할 수 있습니다.또한 코드 변경이 프로그램의 다양한 컴포넌트에 미치는 영향을 예측하고 테스트 사례 선정 및 우선순위 [13][14]부여를 보완하기 위해 소프트웨어에 변경 영향 분석을 적용하였습니다.또한 일관된 코딩 스타일을 보장하기 위해 소프트웨어 라이너를 커밋 후크에 추가하여 소프트웨어가 [15]퇴행하기 쉬운 스타일 문제를 최소화합니다.
현지화
비회귀 소프트웨어 버그의 근본 원인을 찾는 데 사용되는 많은 기술은 브레이크 포인트 디버깅, 인쇄 디버깅, 프로그램 슬라이싱 등 소프트웨어 회귀 디버깅에도 사용할 수 있습니다.다음에 설명하는 기술은 소프트웨어 회귀 디버깅에 주로 사용됩니다.
기능 퇴행
함수 회귀를 현지화하기 위해 사용되는 일반적인 기술은 이분법입니다.이분법은 버그 커밋과 이전에 작업한 커밋을 모두 입력으로 사용하여 [16]그 사이의 커밋에 대해 이진 검색을 수행하여 근본 원인을 찾으려 합니다.Git 및 Mercurial과 같은 버전 관리 시스템은 주어진 [17][18]커밋 쌍에 대해 이등분할을 수행하는 내장 방법을 제공합니다.
다른 옵션으로는 회귀 테스트 결과를 코드 [19]변경과 직접 관련짓는 것, 발산 중단점 [20]설정, 코드 [21]변경 집합과 관련된 테스트 케이스를 식별하는 증분 데이터 흐름 분석 등이 있다.
퍼포먼스 저하
프로파일링은 프로그램의 다양한 컴포넌트의 성능과 자원 사용률을 측정하고 성능 문제를 디버깅하는 데 유용한 데이터를 생성하는 데 사용됩니다.소프트웨어 퍼포먼스 회귀의 맥락에서 개발자는 종종 프로파일러에 의해 생성된 콜트리(「타임라인」이라고도 불린다)를 버그 버전과 이전 버전의 양쪽에서 비교합니다.이 비교를 [22]단순화하는 메커니즘이 존재합니다.일반적으로 웹 개발 도구는 개발자에게 이러한 성능 [23][24]프로필을 기록할 수 있는 기능을 제공합니다.
로깅은 퍼포먼스 회귀 현지화에도 도움이 됩니다.콜 트리와 마찬가지로 개발자는 같은 소프트웨어의 [25]여러 버전에 대해 체계적으로 배치된 퍼포먼스 로그를 비교할 수 있습니다.이러한 퍼포먼스 로그를 추가할 때 트레이드오프가 발생합니다.많은 로그를 추가하면 개발자가 소프트웨어의 어느 부분이 더 작은 단위로 퇴보하고 있는지를 특정할 수 있기 때문에 프로그램 실행 [26]시 오버헤드를 줄일 수 있습니다.
또한 현지화에 도움이 [27]되는 성능 인식 장치 테스트 작성 및 성능 카운터 [28]편차에 따라 하위 시스템의 순위를 매기는 방법이 있습니다.또한 이등분할은 특정 기준선 값 이하(또는 그 이상)를 수행하는 커밋을 버그로 간주하고 이 비교 결과에 따라 커밋의 왼쪽 또는 오른쪽 중 하나를 취함으로써 성능 회귀를 위한 용도로 변경할 수 있습니다.
「 」를 참조해 주세요.
레퍼런스
- ^ Wong, W. Eric; Horgan, J.R.; London, Saul; Agrawal, Hira (1997). "A Study of Effective Regression Testing in Practice". Proceedings of the Eighth International Symposium on Software Reliability Engineering (ISSRE 97). IEEE. doi:10.1109/ISSRE.1997.630875. ISBN 0-8186-8120-9. S2CID 2911517.
- ^ Yehudai, Amiram; Tyszberowicz, Shmuel; Nir, Dor (2007). Locating Regression Bugs. Haifa Verification Conference. doi:10.1007/978-3-540-77966-7_18. Retrieved 10 March 2018.
- ^ Shang, Weiyi; Hassan, Ahmed E.; Nasser, Mohamed; Flora, Parminder (11 December 2014). "Automated Detection of Performance Regressions Using Regression Models on Clustered Performance Counters" (PDF).
{{cite journal}}:Cite 저널 요구 사항journal=(도움말) - ^ Henry, Jean-Jacques Pierre (2008). The Testing Network: An Integral Approach to Test Activities in Large Software Projects. Springer Science & Business Media. p. 74. ISBN 978-3540785040.
- ^ Richardson, Jared; Gwaltney, William Jr (2006). Ship It! A Practical Guide to Successful Software Projects. Raleigh, NC: The Pragmatic Bookshelf. pp. 32, 193. ISBN 978-0-9745140-4-8.
- ^ Leung, Hareton K.N.; White, Lee (November 1990). "A study of integration testing and software regression at the integration level". Proceedings of the International Conference on Software Maintenance. San Diego, CA, USA: IEEE. doi:10.1109/ICSM.1990.131377. ISBN 0-8186-2091-9. S2CID 62583582.
- ^ Rothermel, Gregg; Harrold, Mary Jean; Dedhia, Jeinay (2000). "Regression test selection for C++ software". Software Testing, Verification and Reliability. 10 (2): 77–109. doi:10.1002/1099-1689(200006)10:2<77::AID-STVR197>3.0.CO;2-E. ISSN 1099-1689.
- ^ Weyuker, E.J.; Vokolos, F.I. (December 2000). "Experience with performance testing of software systems: issues, an approach, and case study". IEEE Transactions on Software Engineering. 26 (12): 1147–1156. doi:10.1109/32.888628. ISSN 1939-3520.
- ^ Daly, David; Brown, William; Ingo, Henrik; O'Leary, Jim; Bradford, David (20 April 2020). "The Use of Change Point Detection to Identify Software Performance Regressions in a Continuous Integration System". Proceedings of the International Conference on Performance Engineering. Association for Computing Machinery. pp. 67–75. doi:10.1145/3358960.3375791. ISBN 978-1-4503-6991-6. S2CID 211677818.
- ^ Nistor, Adrian; Jiang, Tian; Tan, Lin (May 2013). "Discovering, reporting, and fixing performance bugs". Proceedings of the Working Conference on Mining Software Repositories (MSR). pp. 237–246. doi:10.1109/MSR.2013.6624035. ISBN 978-1-4673-2936-1. S2CID 12773088.
- ^ Agarwal, Pragya; Agrawal, Arun Prakash (17 September 2014). "Fault-localization techniques for software systems: a literature review". ACM SIGSOFT Software Engineering Notes. 39 (5): 1–8. doi:10.1145/2659118.2659125. ISSN 0163-5948. S2CID 12101263.
- ^ "Git - Git Hooks". git-scm.com. Retrieved 7 November 2021.
- ^ Orso, Alessandro; Apiwattanapong, Taweesup; Harrold, Mary Jean (1 September 2003). "Leveraging field data for impact analysis and regression testing". ACM SIGSOFT Software Engineering Notes. 28 (5): 128–137. doi:10.1145/949952.940089. ISSN 0163-5948.
- ^ Qu, Xiao; Acharya, Mithun; Robinson, Brian (September 2012). "Configuration selection using code change impact analysis for regression testing". Proceedings of the International Conference on Software Maintenance. pp. 129–138. doi:10.1109/ICSM.2012.6405263. ISBN 978-1-4673-2312-3. S2CID 14928793.
- ^ Tómasdóttir, Kristín Fjóla; Aniche, Mauricio; van Deursen, Arie (October 2017). "Why and how JavaScript developers use linters". Proceedings of the International Conference on Automated Software Engineering. pp. 578–589. doi:10.1109/ASE.2017.8115668. ISBN 978-1-5386-2684-9. S2CID 215750004.
- ^ Gross, Thomas (10 September 1997). "Bisection Debugging". Proceedings of the International Workshop on Automatic Debugging. Linkøping University Electronic Press. pp. 185–191.
- ^ "Git - git-bisect Documentation". git-scm.com. Retrieved 7 November 2021.
- ^ "hg - bisect". www.selenic.com. Mercurial. Retrieved 7 November 2021.
- ^ "Reading 11: Debugging". web.mit.edu. MIT.
- ^ Buhse, Ben; Wei, Thomas; Zang, Zhiqiang; Milicevic, Aleksandar; Gligoric, Milos (May 2019). "VeDebug: Regression Debugging Tool for Java". Proceedings of the International Conference on Software Engineering: Companion Proceedings (ICSE-Companion). pp. 15–18. doi:10.1109/ICSE-Companion.2019.00027. ISBN 978-1-7281-1764-5. S2CID 174799830.
- ^ Taha, A.-B.; Thebaut, S.M.; Liu, S.-S. (September 1989). "An approach to software fault localization and revalidation based on incremental data flow analysis". Proceedings of the Annual International Computer Software & Applications Conference. IEEE. pp. 527–534. doi:10.1109/CMPSAC.1989.65142. ISBN 0-8186-1964-3. S2CID 41978046.
- ^ Ocariza, Frolin S.; Zhao, Boyang (2021). "Localizing software performance regressions in web applications by comparing execution timelines". Software Testing, Verification and Reliability. 31 (5): e1750. doi:10.1002/stvr.1750. ISSN 1099-1689. S2CID 225416138.
- ^ "Analyze runtime performance". Chrome Developers. Google. Retrieved 7 November 2021.
- ^ "Performance analysis reference - Microsoft Edge Development". docs.microsoft.com. Microsoft. Retrieved 7 November 2021.
- ^ Yao, Kundi; B. de Pádua, Guilherme; Shang, Weiyi; Sporea, Steve; Toma, Andrei; Sajedi, Sarah (30 March 2018). "Log4Perf: Suggesting Logging Locations for Web-based Systems' Performance Monitoring". Proceedings of the International Conference on Performance Engineering. Association for Computing Machinery. pp. 127–138. doi:10.1145/3184407.3184416. ISBN 978-1-4503-5095-2. S2CID 4557038.
- ^ Li, Heng; Shang, Weiyi; Adams, Bram; Sayagh, Mohammed; Hassan, Ahmed E. (30 January 2020). "A Qualitative Study of the Benefits and Costs of Logging from Developers' Perspectives". IEEE Transactions on Software Engineering. 47 (12): 2858–2873. doi:10.1109/TSE.2020.2970422. S2CID 213679706.
- ^ Heger, Christoph; Happe, Jens; Farahbod, Roozbeh (21 April 2013). "Automated root cause isolation of performance regressions during software development". Proceedings of the International Conference on Performance Engineering. Association for Computing Machinery. pp. 27–38. doi:10.1145/2479871.2479879. ISBN 978-1-4503-1636-1. S2CID 2593603.
- ^ Malik, Haroon; Adams, Bram; Hassan, Ahmed E. (November 2010). "Pinpointing the Subsystems Responsible for the Performance Deviations in a Load Test". Proceedings of the International Symposium on Software Reliability Engineering. pp. 201–210. doi:10.1109/ISSRE.2010.43. ISBN 978-1-4244-9056-1. S2CID 17306870.