Unit Testing Plan for Point Of Sale System Test Plan Test Design Specification Test Cases Specification Project Team Team 1 Date 2017-11-03 Team Information 201211337 김재현 201112052 방민석 201312259 백만일 201211383 조영래
Table of Contents 1 Introduction... 4 1.1 Objectives... 4 1.2 Background... 4 1.3 Scope... 4 1.4 Project plan... 4 1.5 Configuration management plan... 4 1.6 References... 4 2 Test items... 4 3 Features to be tested... 6 4 Features not to be tested... 6 5 Approach... 6 6 Item pass/fail criteria... 7 7 Unit test design specification... 7 7.1 Test design specification identifier... 7 7.2 Features to be tested... 7 7.3 Approach refinements... 7 7.4 Test identification... 7 7.5 Feature pass/fail criteria... 10 8 Unit test case specification... 10 8.1 Test case specification identifier... 10 8.2 Test items... 13
8.3 Input specifications... 13 8.4 Output specifications... 14 9 Testing tasks... 14 10 Environmental needs... 14 11 Unit Test deliverables... 14 12 Schedules... 14
1 Introduction 1.1 Objectives 본문서는 2017 학년도 2학기소프트웨어공학개론수업의 Team1이개발한 POS system( 이하 POS) Unit Test 하기위한계획문서이다. Team 1이정의한 Unit Testing 을수행하기위하여 Testing Pass/Fail Criteria를정의하고이를수행하기위한 Test Design & Test Cases 를제작한다. 1.2 Background POS system 은사용자의요구에따라판매와관련된데이터를일관적으로관리하고, 고객정보를수집하여부가가치를향상시키는시스템이다. Unit Test는시스템을구성하는최소단위모듈들을대상으로하는 Test이며, 시스템의성능을좌우하는요소들이요구사항을만족하는지를확인할수있는기본적인 Test approach이다 1.3 Scope POS system 대한 Unit Test 를수행하기위한자원과절차, Test approach 와 Technique 와 필요로하는환경및도구등을정의한다. Unit Test 는시스템핵심기능관련프로 세스에중점을두며전달역할등단순프로세스는 Test 에서제외한다. 1.4 Project plan 1.5 Configuration management plan 1.6 References 2 Test items Team1 이 SASD 기법을이용하여개발한 POS 를 Testing 한다. SA에서최소단위의각 Process 별로요구사항을만족하는지, 정상적인결과가나오는지, 잘못된값입력시예외처리가동작하는지 Testing 을수행한다. <Figure 1 Overall DFD> 는 SA를이용하여요구사항을분석한결과를 DFD를이용해나타낸그림이고, <Figure 2 Structural Chart> 는 SD의 Basic Structural Chart를나타낸그림이다. 각그림을참조하여 Unit을지정하고, 지정한 Unit을 SRA에명세된내용과같은동작을하는지확인한다.
<Figure 1 Overall DFD> <Figure 2 Structural Chart>
3 Features to be tested 시스템핵심기능관련모듈중입력담당모듈부분과처리담당모듈부분을거쳐요구사항만족, 정상적인동작과잘못된값입력시동작에중점을두어테스트한다. 1) Process in SRA : 각프로세스가가지고있는요구사항을만족하는지테스트한다. 2) Modules in SDS : 각모듈이가지고있는데이터인터페이스를테스트한다. <Table1 Testing Process(DFD) 리스트 > ID Name Description 1.3 Determine Barcode 입력받은데이터를 Barcode Data형태로변환한다. 1.4 Determine Command 디스플레이를통해입력받은데이터를 Command Data형태로변환한다. 2.2 Convert Server Data 서버로부터받은데이터를 Server Data형태로변환한다. 3.1.1 Controller 입력된 Data를 Command Data를바탕으로프로세스들을트리거한다. 3.1.2 Display Main 입력데이터를 Display Data형태로만든다. 3.1.3 Sale 판매될수량을서버와비교해서판매가능하면 Sale Data형태로만든다. 3.1.4 Refund 환불물품을서버와비교해서환불가능하면 Refund Data형태로만든다. 3.1.5 Check Inventory 서버에서재고목록을받아온다. 3.1.6 Settlement 서버에서판매, 환불영수증을읽어와 Settlement Data 형태로만든다. 3.1.7 Update Display 계산된 Data를 Display Data형태로만들어 Display Inte rface에전달한다. 3.1.8 Update Server 계산된 Data를 Server Data형태로만들어 Server Inter face에전달한다 3.1.9 Print Data 계산된 Data를 Printer Interface에전달한다 4 Features not to be tested 5 Approach 전달역할, 단순한프로세스, UI 구성프로세스, 특수한상황에서만작동하는프로세스 는테스트에서제외한다. CMS 의 Program source code 와 Unit Tests 는 Cygwin 환경에서이루어지며,
Program code 의변경및수정사항은지속적으로통합되고테스트된다. 6 Item pass/fail criteria 각 Unit 별 Pass/Fail Criteria 는 <Test Case Identification> 을참조한다. 7 Unit test design specification 7.1 Test design specification identifier POS_[Category]_000 7.2 Features to be tested <Table 1 Testing Process(DFD) 리스트 > 참조 7.3 Approach refinements 각 Process Specification 에명시된내용을기반으로 Test Design 및 Test Cases 를 생성해낸다. 7.4 Test identification <Table2 Test Design Identification> Identifier Feature (Process DFD) Valid / Invalid value POS_BAR_DATA_01 1.3 Determine Barcode determine_barcode(list, SERVER, &server, b, 001, -1} POS_BAR_DATA_02 1.3 Determine Barcode determine_barcode(list, SERVER, &server, b, 010, -1} POS_BAR_DATA_03 1.3 Determine Barcode determine_barcode(list, SERVER, &server, b, 011, -1} POS_BAR_DATA_04 1.3 Determine Barcode determine_barcode(list, SERVER, &server, b, 100, -1} POS_BAR_DATA_05 1.3 Determine Barcode determine_barcode(list, SERVER,
&server, b, 101, -1} POS_BAR_DATA_06 1.3 Determine Barcode determine_barcode(list, SERVER, &server, b, 110, -1} POS_BAR_DATA_07 1.3 Determine Barcode determine_barcode(list, SERVER, &server, b, 111, -1} POS_BAR_DATA_08 1.3 Determine Barcode determine_barcode(list, SERVER, &server, b, 000, -1} POS_BAR_DATA_09 1.3 Determine Barcode determine_barcode(list, SERVER, &server, r, barcode, -1} POS_COMMAND_DATA_01 1.4 Determine Command determine_command(command, SERVER, LIST, state) : { b, &server, POS_COMMAND_DATA_02 1.4 Determine Command determine_command(command, SERVER, LIST, state) : { s, &server, &list, 1} POS_COMMAND_DATA_03 1.4 Determine Command determine_command(command, SERVER, LIST, state) : { r, &server, &list, 2} POS_COMMAND_DATA_04 1.4 Determine Command determine_command(command, SERVER, LIST, state) : { C, &server, &list, 3} POS_COMMAND_DATA_05 1.4 Determine Command determine_command(command, SERVER, LIST, state) : { i, &server, POS_COMMAND_DATA_06 1.4 Determine Command determine_command(command, SERVER, LIST, state) : { c, &server, POS_COMMAND_DATA_07 1.4 Determine Command determine_command(command, SERVER, LIST, state) : { e, &server, &list, 0} POS_COMMAND_DATA_08 1.4 Determine Command determine_command(command, SERVER, LIST, state) : { x, &server,
POS_SERVER_DATA_01 2.2 Convert Server Data convert_server(server, LIST, receipt_num, type) : {&server, &list, receipt_num,0} POS_SERVER_DATA_02 2.2 Convert Server Data convert_server(server, LIST, receipt_num, type) : {&server, &list, receipt_num,1} POS_SERVER_DATA_03 2.2 Convert Server Data convert_server(server, LIST, receipt_num, type) : {&server, &list, receipt_num,2} POS_Controller_01 3.1.1 Controller selected_state {-1} POS_Controller_02 3.1.1 Controller selected_state { 0} POS_Controller_03 3.1.1 Controller selected_state {1} POS_Controller_04 3.1.1 Controller selected_state {2} POS_Controller_05 3.1.1 Controller selected_state {3} POS_Controller_06 3.1.1 Controller selected_state {4} POS_Controller_07 3.1.1 Controller selected_state {int_max} POS_Display_Main_01 3.1.2 Display Main display_main(display) : {&display} POS_SALE_DATA_01 3.1.3 Sale sale(r_price, LIST, SERVER, SALE, state, DISPLAY) : {r_price, list, server, sale, 1, display} POS_SALE_DATA_02 3.1.3 Sale sale(r_price, LIST, SERVER, SALE, state, DISPLAY) : {0, 0, server, sale, 1, display} POS_SALE_DATA_03 3.1.3 Sale sale(r_price, LIST, SERVER, SALE, state, DISPLAY) : {r_price, 0, server, sale, 1, display} POS_SALE_DATA_04 3.1.3 Sale sale(r_price, LIST, SERVER, SALE, state, DISPLAY) : {r_price, 0, 0, sale, 1, display} POS_REFUND_DATA_01 3.1.4 Refund Refund(LIST, SERVER, REFUND, state, DISPLAY) : {&list, &server,,&refund, 2, display} POS_CHECK_DATA_01 3.1.5 Check Inventory Check(SERVER, state, DISPLAY) : {&server, 3, &display} POS_SETTLEMENT_01 3.1.6 Settlement settlement(list, SERVER, SETTLEMENT, state) : {&list, &server, &settlement, 4} POS_SETTLEMENT_02 3.1.6 Settlement settlement(list, SERVER, SETTLEMENT, state) : {0, &server, &settlement, 4}
POS_Update_Display_01 3.1.7 Update Display update_display(sale,refund, SERVER, DISPLAY) : {1, 0, 0, 0} POS_Update_Display_02 3.1.7 Update Display update_display(sale,refund, SERVER, DISPLAY) : {0, 1, 0, 0} POS_Update_Display_03 3.1.7 Update Display update_display(sale,refund, SERVER, DISPLAY) : {0, 0, 1, 0} POS_Update_Server_01 3.1.8 Update Server update_server(server, LIST) : {&server, &list} POS_Update_Server_02 3.1.8 Update Server update_server(server, LIST) : {&server, 0} POS_PRINT_DATA_01 3.1.9 Print Data print_data(sale, REFUND, SERVER, SETTLEMENT) : {&sale, 0, 0, 0} POS_PRINT_DATA_02 3.1.9 Print Data print_data(sale, REFUND, SERVER, SETTLEMENT) : {0, &refund, 0, 0} POS_PRINT_DATA_03 3.1.9 Print Data print_data(sale, REFUND, SERVER, SETTLEMENT) : {0, 0, &server, 0} POS_PRINT_DATA_04 3.1.9 Print Data print_data(sale, REFUND, SERVER, SETTLEMENT) : {0, 0, 0, &settlemenet} 7.5 Feature pass/fail criteria POS 의각모듈은 SRA 에정의되어있는요구사항을만족해야한다. 각모듈의입 / 출력및동작은 SRA 의 Process description 항목및 STD 를참조한다. 8 Unit test case specification 8.1 Test case specification identifier <Table3 Test Case Identification> Identifier Input Specification Output Specification POS_BAR_DATA_01 determine_barcode(list, SERVER, Barcode Data(product) {&list, &server, b, 001, -1} POS_BAR_DATA_02 determine_barcode(list, SERVER, Barcode Data(product) {&list, &server, b, 010, -1} POS_BAR_DATA_03 determine_barcode(list, SERVER, Barcode Data(product)
POS_BAR_DATA_04 POS_BAR_DATA_05 POS_BAR_DATA_06 POS_BAR_DATA_07 POS_BAR_DATA_08 POS_BAR_DATA_09 POS_COMMAND_DATA_01 POS_COMMAND_DATA_02 POS_COMMAND_DATA_03 POS_COMMAND_DATA_04 POS_COMMAND_DATA_05 POS_COMMAND_DATA_06 {&list, &server, b, 011, -1} determine_barcode(list, SERVER, {&list, &server, b, 100, -1} determine_barcode(list, SERVER, {&list, &server, b, 101, -1} determine_barcode(list, SERVER, {&list, &server, b, 110, -1} determine_barcode(list, SERVER, {&list, &server, b, 111, -1} determine_barcode(list, SERVER, {&list, &server, b, 000, -1} determine_barcode(list, SERVER, {&list, &server, r, barcode, -1} determine_command(command, SERVER, LIST, state) : { b, &server, determine_command(command, SERVER, LIST, state) : { s, &server, &list, 1} determine_command(command, SERVER, LIST, state) : { r, &server, &list, 2} determine_command(command, SERVER, LIST, state) : { C, &server, &list, 3} determine_command(command, SERVER, LIST, state) : { i, &server, determine_command(command, SERVER, LIST, state) : { c, &server, Barcode Data(product) Barcode Data(product) Barcode Data(product) Barcode Data(product) Error(Exception Handling) Barcode Data(receipt) Command = Input Barcode Command = Sale Command = Refund Command = Check Command = Input Cash Command = product_amt change
POS_COMMAND_DATA_07 determine_command(command, Command = Exit SERVER, LIST, state) : { e, &server, &list, 0} POS_COMMAND_DATA_08 determine_command(command, Error(Exception Handling) SERVER, LIST, state) : { x, &server, POS_SERVER_DATA_01 convert_server(server, LIST, Server Data receipt_num, type) : {&server, &list, receipt_num,0} POS_SERVER_DATA_02 convert_server(server, LIST, Server Data receipt_num, type) : {&server, &list, receipt_num,1} POS_SERVER_DATA_03 convert_server(server, LIST, Server Data receipt_num, type) : {&server, &list, receipt_num,2} POS_Controller_01 selected_state {-1} Input Barcode POS_Controller_02 selected_state { 0} Wait POS_Controller_03 selected_state {1} Sale POS_Controller_04 selected_state {2} Refund POS_Controller_05 selected_state {3} Check POS_Controller_06 selected_state {4} Settlement POS_Controller_07 selected_state {int_max} Error(Exception Handling) POS_Display_Main_01 display_main(display): {&display} Display Data POS_SALE_DATA_01 sale(r_price, LIST, SERVER, SALE, Sale Data state, DISPLAY) : {r_price, list, server, sale, 1, display} POS_SALE_DATA_02 sale(r_price, LIST, SERVER, SALE, state, DISPLAY) : {0, list, server, Error(Exception Handling) r_price < total_price sale, 1, display} POS_SALE_DATA_03 sale(r_price, LIST, SERVER, SALE, Error(Exception Handling) state, DISPLAY) : {r_price, 0, List x server, sale, 1, display} POS_SALE_DATA_04 sale(r_price, LIST, SERVER, SALE, state, DISPLAY) : {r_price, list, 0, sale, 1, display} Error(Exception Handling) p_amt > server_stock POS_REFUND_DATA_01 Refund(LIST, SERVER, REFUND, Refund Data state, DISPLAY) : {&list, &server,,&refund, 2, display}
POS_CHECK_DATA_01 Check(SERVER, state, DISPLAY) : {&server, 3, &display} POS_SETTLEMENT_01 settlement(list, SERVER, SETTLEMENT, state) : {list, &server, &settlement, 4} POS_SETTLEMENT_02 settlement(list, SERVER, SETTLEMENT, state) : {0, &server, &settlement, 4} POS_Update_Display_01 update_display(sale,refund, SERVER, DISPLAY) : {1, 0, 0, 0} POS_Update_Display_02 update_display(sale,refund, SERVER, DISPLAY) : {0, 1, 0, 0} POS_Update_Display_03 update_display(sale,refund, SERVER, DISPLAY) : {0, 0, 1, 0} POS_Update_Server_01 update_server(server, LIST) : {&server, &list} POS_Update_Server_02 update_server(server, LIST) : {&server, 0} POS_PRINT_DATA_01 print_data(sale, REFUND, SERVER, SETTLEMENT) : {&sale, 0, 0, 0} POS_PRINT_DATA_02 print_data(sale, REFUND, SERVER, SETTLEMENT) : {0, &refund, 0, 0} POS_PRINT_DATA_03 print_data(sale, REFUND, SERVER, SETTLEMENT) : {0, 0, &server, 0} POS_PRINT_DATA_04 print_data(sale, REFUND, SERVER, SETTLEMENT) : {0, 0, 0, &settlemenet} Chech Data Settlement Data Error(Exception Handling) List x Display Command Display Command Display Command Save Error(Exception Handling) list x Printer Command Printer Command Printer Command Printer Command 8.2 Test items <Table 2 Test Design Identification> 참조 8.3 Input specifications <Table3 Test Case Identification> 참조
8.4 Output specifications <Table3 Test Case Identification> 참조 9 Testing tasks < Table4 Testing tasks & Schedule > Task Predecessor task Special skills Effort Finish data Unit Test Plan 작성 SRA 작성 2017-11-01 SDS 작성 POS 구현 Test Design Specification Task1 POS 에대한이해 2017-11-02 Test Case Specification Task 2 2017-11-03 Test Execution Task 3 Test Code 작성 2017-11-04 Unit test tool 활용 Test result report Task 4 2017-11-06 10 Environmental needs POS system Unit Test 를위한환경적요구사항은다음과같다. (1) Hardware &platform GCC compiler/linker (2) Unit test framework CUni (3) Integrated Platform Cygwin Cygwin 11 Unit Test deliverables 12 Schedules < Table4 Testing taskes & Schedule > 참조