Automatic Generation of System Test Cases for a Systems Under Development

Automatic Generation of System Test Cases for a Systems Under Development

Sudan University of Science and Technology College of computer science and information technology Automatic Generation Of System Test Cases For a Systems Under Development November 2017 1 بسمميحرلا نمحرلا هللا Sudan University of Science and Technology College of Computer Science and Information Technology Automatic Generation of System Test Cases For a Systems Under Development This Is Summated As a Partial Requirement B.SC.(Honor) Degree In Software Engineering Date: November 2017 By: Abuhorira Faisal Abd Alraheem Alsheikh Musa Mohammed Hamed Makki Gamar Aldawla Makki Zahier Bannaga Albashir Bannaga Supervisor: Olla Faisal Noraldeen Signature: ………………………… Date: ……………………………… 2 اﻵية اعوذ ابهلل من الشيطان الرجيم ) ِ ِ قال تعايل: أَفَ َحسْب تُْم أَمَّنَا َخلَْقنَاُك ْم َعبَ ثًا َوأَنم ُك ْم إِلَْي نَا ﻻ تُ ْرَجعُوَن )111( فَ تَ َعاََل ا مَّللُ الَْمل ُك ا ْْلَُّق ﻻ ِ ِ ِ ِ ِِ ِم ِ ِ ِِ إلَوَ إﻻم ُىَو َر ُّب الَْعْر ِش الْ َكِرِمي )116( َوَمن يَْدعُ َم َع ا مَّلل إََلًا آ َخَر ﻻ بُ ْرَىا َن لَوُ بو فَإَّنَا ح َسابُوُ عن َد َربّو ِ ِ ِ ِ ِ ِِ إنموُ ﻻ يُ ْفل ُح الْ َكافُروَن )117( َوقُل مر ّب ا ْغفْر َواْرَح ْم َوأَن َت َخْي ُر المراِح َي )118( ( املؤمنون I إهداء إَل من كللو هللا ابَليبة والوقار .. إَل من علمين العطاء بدون انتظار .. إَل من أِحل أمسو بكل افتخار ..أرجو من هللا أن ميد يف عمرك لرتى مثارا ً قد حان قطافها بعد طول انتظار وستبقى كلماتك جنوم أىتدي هبا اليوم ويف الغد و إَل اﻷبد )والدي العزيز( إَلمﻻكييف اْلياة .. إَل معىن اْلب وإَل معىن اْلنان والتفاين .. إَل بسمة اْلياة وسر الوجود إَل من كان دعائها سر جناحي وحناهنا بلسم جراحي إَل أغلى اْلبايب )أمي الغالية( إَل من كانوا يضيئون يل الطريق ويساندوين ويتنازلون عن حقوقهم ﻹرضائي والعيش يف ىناء )إخويت( إَل توأم روحي ورفقاء دريب إَل أصحاب القلوب الطيبة والنوااي الصادقة إَل من رافقوين يفدريب وجناحي )أصدقائي( إَل كل من سقط من قلمي سهوا ً أىدي ىذا العمل II شكر وعرفان إَل من علمتنا أن نقف و كانت سنداً لنا وَلا الفضل يف إرشادان إَل الدرب القومي اﻷستاذة اجلليلة عٌﻻ فيصل نور الدين وأيضا نتقدم جبزيل شكران إَل كل من مد لنا يد العون واملساعدة يف إخراج ىذه الدراسة على أكمل وجو III Abstract This study presents a tool that helps programmers to test their program using automatically generated test cases for return type methods without writing these test cases manually. A tool does this by analyzing program under test and defines all methods that have testing values and then collecting these methods in a file and generate test cases for every returned value methods. Each method has specific class saved in a file that contained the test cases and provides these test cases for executing without a need to write them manually. The use of this method reduces the exploited effort in writing test cases manually so save time then accelerates the testing process. Also, uses of this method accelerate the delivery time of the program of which accelerates program development and delivery is final. IV املستخلص ىذه الدراسة تقدم أداة تساعد املربجمي على إختبار براجمهم عن طريق كتابة حاﻻت اﻻختبار لكل دالة تقوم إبرجاع قيمة تلقائيا بدون كتابة ىذه اْلاﻻت يدواي. وتقوم ىذه اﻻداة بتحليل الربانمج قيد اﻹختبار وحتدد كل الدوال اليت تقوم إبرجاع قيم و اليت يوجد َلا حاﻻت إختبار وجتمع ىذه الدوال يف ملف وتولد حاﻻت اﻹختبار لكل دالة على حدة وكل دالة َلا صنف معي حيفظ يف ملف ىذا امللف حيتوي على حاﻻت اﻹختبار اخلاصة ابلدالة وتكون حاﻻت اﻹختبار جاىزة للتنفيذ من دون اْلاجة أَل كتابتها يدواي. ىذه الطريقة تقللمن اجلهد املبذول يف كتابة حاﻻت اﻹختبار يدواي وابلتايل توفر الوقت وتسرع من عملية إختبار الربانمج. أيضا إبستخدام ىذه الطريقة يتم تسريع عملية تسليم الربانمج ووضعو قيد اﻹستخدام مما يسرع عملية التطوير وتسليم الربانمج بشكل هنائي. V Table of Contents Section Section Name Page Number Number 1. Introduction And Problem Statement 1.1 Introduction 1 1.2 Problem definition 2 1.2.1 Problems with manual Testing 2 1.2.2 Costs 2 1.2.3 Risks 3 1.2.4 Human resources 3 1.3 Automation testing 3 1.3.1 Problems with automation testing 3 1.4 Suggested solution 4 1.5 Research Questions 4 1.6 Importance of project 4 1.7 Scope of project 4 1.8 Objectives 4 1.9 Expected outcomes 5 1.10 Structure 5 2. Overview of the testing and previous studies 2.1 Introduction 6 2.2 General Concepts 6 2.2.1 Software testing 6 2.2.2 Testing Principles 7 2.2.3 Testing Objectives 7 2.2.4 Test-Case Design 8 2.2.5 Testing methods 8 2.2.5.1 White-Box Testing 8 2.2.5.2 Black-Box testing 9 2.2.6 Levels of Testing 10 2.2.6.1 Unit Testing 11 2.2.6.2 Integration Testing 11 2.2.6.3 System Testing 12 2.2.6.4 Acceptance Testing 12 2.2.7 Non-Functional Testing 13 2.2.7.1 Reliability Testing 13 VI 2.2.7.2 Usability Testing 13 2.2.7.3 Security Testing 13 2.2.7.4 Efficiency Testing 13 2.2.7.5 Portability testing 13 2.3 Literature survey 14 2.3.1 Randoop 14 2.3.2 Jwalk 15 2.3.3 Tool for Automatic Test Case Generation in Spreadsheets 15 2.3.4 Jtest 16 2.3.5 Survey summary 17 3. Tools and techniques used in the Implementation 3.1 Introduction 18 3.2 UML 18 3.2.1 Use case Diagram 18 3.2.2 Activity diagram 19 3.2.3 Sequence diagram 19 3.3 Enterprise Architect 19 3.4 Eclipse IDE 19 3.5 Java language 20 3.5.1 Java Is 20 3.5.2 GUI 22 3.5.3 Why we use Java language 22 3.6 JUNIT 22 4. Analysis by UML diagram 4.1 Introduction 23 4.2 Functional Requirements 23 4.3 Nonfunctional Requirements 23 4.4 Use Case Diagram Figure 24 4.5 Activity Diagram Figure 25 4.6 Sequence Diagram Figure 26 4.6.1 Create Project 26 4.6.2 Code Writing 27 4.6.3 Code Saving 28 4.6.4 Project Opening 29 4.6.5 Test Case Generation 30 4.6.6 Test Case Displaying 31 5. Implementation Automatic Generation of System test cases for system under development 5.1 Introduction 32 VII 5.2 Tools Process 32 5.2.1 Writing code 33 5.2.2 Import code 34 5.2.3 Generate Test Cases 35 5.2.3 Figure Test case for find maximum number method 36 5.2.3 Figure Test case for method that finds division result 37 5.2.3 Figure Test case for method that finds summation result 38 5.2.3 Figure Test case for method that finds subtract result 39 5.2.3 Figure Test case for method that finds multiple results 40 5.2.3 Figure Test case for method that finds minimum number result 41 5.3 Conclusion 41 6. Results and Recommendation 6.1 Introduction 42 6.2 Result 42 6.3 Conclusion 42 6.4 Recommendation 43 References References 44 7. Appendix A Business Process Modeling Notation(BPMN) 45 B Analyze code 46 VIII List of Figures Figure Name Page Number Figure (2.1) White-Box Testing 9 Figure (2.2) Black-Box Testing 10 Figure (2.3) Levels Of Testing 11 Figure (2.4) Show Test Cases 16 Figure (4.1) Use Case Diagram 24 Figure (4.2) Activity Diagram 25 Figure (4.3) Create Project 26 Figure (4.4) Code Writing 27 Figure (4.5) Code Saving 28 Figure (4.6) Project Opening 29 Figure (4.7) Generate Test Case 30 Figure (4.8) Display Test Case 31 Figure (5.1) Main screen 32 Figure (5.2) Writing code 33 Figure (5.3) Import code 34 Figure (5.4) Example 35 Figure (5.5) Test case for find maximum number method 36 Figure (5.6) Test case for method that finds division result 37 Figure (5.7) Test case for method that finds summation result 38 Figure (5.8) Test case for method that finds subtract result 39 Figure (5.9) Test case for method that finds multiple results 40 Figure (5.10) Test case for method that finds minimum number result 41 Figure (7.1) BPMN 45 IX 1 Chapter One Introduction and Problem Statement 2 1.1 Introduction Software engineering is aimed to development and design of high-quality software taking into account user requirements and customizations at all levels of software development lifecycle. Concerned with the composition of software engineering program since its early stages during the analysis of the problem and then to find an adequate solution of that problem design and implement, test that program, and use that program, finally maintain it if there is a need to change or modify. Software testing is one of the important parts of software development life cycle because that it is the stage at which we can ascertain the validity of the program have been developed, and determine the correctness of software under the assumption of some specific hypotheses by detecting the bugs, defects, and problems that lead failure of software. The software historically evolved, in the beginning, it was the debugging oriented period, where testing was often associated to debugging: there was no clear difference between testing and debugging.In the period that followed there was the demonstration oriented period where debugging and testing was distinguished now - in this period it was shown that software satisfies the requirements. Also in the period that followed is announced as the destruction oriented period, where the goal was to find errors.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    69 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us