Lesson Testing and Deploying Applications - Software Engineering - ثالث ثانوي
1. Software Engineering
2. Prototyping
3. Developing Applications with App Inventor
4. Software Accessibility and Digital Inclusion
4. Software Accessibility and Digital Inclusion In this unit, you will learn about the process of testing applications and then you will deploy and test the application you built in the previous unit. Then you will understand the digital divide problem and how digital inclusion can be used to solve it. Finally, you will develop accessibility features for the mobile application you built in order to make it more inclusive for users with disabilities. زارة التعليم Ministry of Education 184 2024-1446 Learning Objectives In this unit, you will learn to: > Explain the various stages and methodologies of testing software. > Deploy and test mobile applications in MIT App Inventor. > Define the problems created by the digital divide. > Distinguish the solutions for fostering digital inclusion. > Analyze the various accessibility features for both hardware and software. > Enhance mobile applications with accessibility features. Tools > MIT App Inventor >Pencil Project
Software Accessibility and Digital Inclusion
Learning Objectives
Tools
Lesson 1 T Testing and deploying applications Link to digital lesson www.ien.edu.sa The Importance of Application Testing When you complete developing an application, you may feel confident that everything has worked as you planned. However, mistakes can happen, and the initial application may not achieve the desired results, so you must verify that the program works as expected without errors or defects. The purpose of testing is to show that the program works correctly and to find previously undiscovered errors or errors related to incorrect application usage. What is Software Quality Software quality is the study of a software product to check whether it meets the user specifications, if it is usable and functional, if it has few errors and if it can be properly maintained and improved. The following table illustrates the main quality attributes of a software product. Table 4.1: Main software quality attributes Attribute عناية التعليم Ministry of Education 2024-1446 Description Functionality A software product is functional when it meets the end-user requirements and can accomplish all the specified tasks. Reliability A software product is reliable when it is not prone to errors and can perform well under restricted resources. Usability A software product is more usable if different users can easily access its capabilities. Efficiency A software product is efficient when it does not waste resources such as processing power, memory or network capacity. Maintainability Portability A software product is maintainable if bugs can be easily fixed as they appear and new features can be easily implemented. A software product is portable if it can work under other operating systems, on many devices, with other software, etc. 185
The Importance of Application Testing
What is Software Quality
Table 4.1: Main software quality attributes
Difference between Application Debugging and Testing Debugging is the process of removing bugs and malfunctions from the software, which occurs after testing. Testing is the process of validating the software. For example, during testing, it may occur that a specific component in the UI of an application does not render the correct information to the user. During debugging, it is found that a false calculation in program logic causes the error in the rendering, and it is corrected. Therefore, proper testing is needed to proceed to the debugging phase. Who Performs Tests The programmer or developer tests the code they write most often. But the programmer who wrote the code is not the best option. Sometimes he may not be able to see the mistakes he made. For this reason, we need another person called a tester to do the testing focusing on the program's functionality and testing the results by entering different input data sets, for example. Programmers do the initial tests, but the tester judges the software's quality and that it works as expected. Some software development companies include a testing department, usually called the Quality Assurance Department, which specializes in validating the correct behavior of the program. A test does not guarantee that the program is 100% correct, but it does reveal potential errors. Choosing Test Data The best way to test a program is to manually compute its output before running it and see if the results match what you calculated or not. In other words, write the expected outcome of the program before running it and compare the running result with the real output of the program. Whatever data the user enters, the program must function correctly. If invalid data is entered, the program must state that the data is not acceptable and request a re-enter. The developer needs to consider all the possible values of the entered data. To properly test the program, we need to choose test data representing all possibilities of user input. Test data is divided into the following categories: • Normal data: The data is usually used when dealing with the program by the user, and it includes a set of values of the same type as the expected data. For example, if you have to enter a month as an integer from 1 to 12, then the normal data is an integer from 1 to 12. • Boundary data: It is data located on the outliers of the range of expected values. For example, if you expect to enter a year between 1900 to 2020, then the outliers are 1900 and 2020, and so you are testing the program when you enter 1900 or 2020 as numbers into the program to see if any errors happen. • Erroneous data: Data that is outside the range of expected values or is of an incorrect data type. In the previous example, if the user entered 0 or 13 as the month, or entered the word January instead of the integer 1, there would be an error. Automated Testing Often the software is large and complex, with many updates and modifications that may change its functionality after its initial release. In this case, the testing procedure must perform the same tests. • ⚫and some new ones to verify that the software is working properly. But if the tests are many, it will take a lot of time and effort to do it manually. The tester can create a set of automatic tests updated pill each time the program is changed. The tester writes their code to test the program through several Ministry of Education 186 2024-1446
Difference between Application Debugging and Testing
Who Performs Tests
Choosing Test Data
Automated Testing
tools to automate this process. For example, some of the most popular testing frameworks for Android are Appium, Espresso and UI Automator. Testing Strategies Testing is divided into several categories depending on the complexity of the code or application being tested. Most testing time is consumed on programming functions and the main program at the lowest level. Developers, both small and large, use many different testing strategies. The following table illustrates the most common testing strategies. Table 4.2: Common testing strategies Name Dry Run Testing Usability Testing Black-Box Testing White-Box Testing Unit Testing Integration Testing Performance Testing Acceptance Testing Penetration Testing Stress Testing Description In this method, you follow the logic of the program as the computer executes each statement in the code and records the value of each variable in the tracking table. Usability or user experience (UX) tests are conducted to ensure that the software is easy and understandable to the end user. Black box tests consider the parts of the program that you test as a closed box, so the code is ignored, and the input and output data are dealt with only to see if the tester gets the expected results when entering the data or not. In white-box testing, the tester has access to the code, so the testing process is focused on verifying the correctness of the code implementation. This includes testing the code logic, data structures, algorithms, error handling, and boundary conditions. Unit testing is testing each program's function separately to ensure that each process works before fully verifying that the program works. Integration tests check how different parts of a program behave when they work together as an integrated system. Performance tests check the performance of a program or system under data loads or increased user numbers. Issues that need to be fixed to ensure scalability will emerge. Acceptance tests will show whether the product meets all the requirements of users with different needs, and this test is suitable for large multi-user software. Penetration tests focus on the security of a program or system. It checks how to protect the program from attacks and intrusions. Stress testing is a testing technique that focuses on evaluating the performance of a software system under extreme conditions. The goal of stress testing is to identify the breaking point of the system and to determine how it behaves when it is under maximum stress. Test Planning A test plan or test schedule is a list of tests planned to be carried out to check the accuracy of the program and then to record the results of each test. • A table that includes test data, the purpose of each test, expected results, and actual results when the pulprogram is run. Each row in this test table is called a test case. Ministry of Education 2024-1446 187
Testing Strategies
Table 4.2: Common testing strategies
Test Planning
• A test scenario validates a specific part of a program's functionality and may contain a set of test cases. • Strictly defined acceptance criteria in each test scenario. The test case should be distinct from the use case. As we saw earlier, the use case defines how the program or system is used to perform a specific task. It is usually a diagram showing the sequence of actions the user will follow when interacting with the program. The goal of testing is intentionally creating error states with valid and invalid data. Test scenarios and cases are often planned before the actual programming is done. Test Documentation The testing process needs to be carefully documented to benefit from it in the tests of the following versions, and the testing documents include the following: • Testing Policy - Describe the principles, methods, and objectives of testing. • Test Plan - Description of the software, its functions, parts to be tested, and scope of tests. • Test Specifications - Details of each test scenario and its evaluation criteria. • Test Description - Test data and procedures for each test case. • Test Analysis Report - The results of each test scenario. • Bug Report - A report of any software bug, error, or problem. • Test Summary Report - The final report that summarizes the completed testing process. Testing Visit Saudi Tourism Application After you have created your application, it is important to distribute your app for testing. The testers should vary in their profiles. This variety gives the developer more information on what to fix in the application and which features to implement. For example, in the current state of the application, users with difficulty in their vision or hearing impairments, will have trouble getting the correct information. In a later lesson, you will implement accessibility features for the mobile application you have created. Packaging and Distributing an Application After you have developed and tested your application, you need to package it into a file format that can be downloaded and installed on Android mobile devices. Then it can be distributed with two methods. • Downloading a package on your phone: Downloading the package from your computer or from a website link and installing the application directly on your physical mobile phone. • Publishing to a store application: Uploading the package to a store application so users can find it from wherever they are. Application Versioning san Whichever method you choose for distributing your application, the first step in packaging is versioning. Each application does not stay the same forever. Fixes and updates are being implemented continuously. You have the same application name, but there may be changes to the UI or the code functionality. So there needs to be a way to differentiate those apps. Versioning is an identifier code that indicates which version of the application the user has currently installed on their mobile device. On applications pull that are meant for android, versioning is defined by the following properties: Ministry of Education 188 2024-1446
Test Documentation
Testing Visit Saudi Tourism Application
Packaging and Distributing an Application
Versioning your Application
A test scenario validates a specific part
VersionCode: An identifier number that is defaulted to 1. It should be incremented every time that you upload a new version to a store application. • VersionName: A string that can be set to any value but is defaulted to "1.0". The industry- standard convention is to increment the first digit every time that you make a major update to the app and increment the second digit every time that you make a minor update to the app. For example, an app that starts with the VersionName "1.0" and makes a minor update gets the VersionName "1.1". When a major update is implemented, then the Version Name becomes "2.0". In MIT App Inventor, many general application properties including the versioning of the application are modified from the Properties section of Screen1. This is the reason why Screen1 cannot be removed as a screen from the application. Application Appearance There is also other information that is presented to the user when they want to download your application from the store. These are the following: • Application Name: This is the name that appears on the store and on your phone in your list of applications. • Application Description: Text that gives a brief overview of the application. • Application Logo: The logo icon that appears on the store and on your phone. Application Packaging VersionCode 1 VersionName 1.0 This information is defined in the Properties section of Screen1. The properties that must be defined are the following: AppName Visit SA App Icon None... AboutScreen In order to install your application on a physical mobile phone, you need to convert what you have created in the browser of the App Inventor into a file that can be installed by Android devices. For Android mobile applications there are two package types. وزارة التعليم Ministry of Education 2024-1446 .apk .aab Standard Android package format that has been used since the creation of the Android operating system. It is the simplest way to distribute an Android application. APKs can be downloaded directly from a website link or can be uploaded to the Google Play store. Android App Bundles (AABs) are a newer file format that is used to package Android applications. They contain an APK and metadata that allows the application to run smoothly on a wide range of devices. They can only be distributed through the Google Play store. 189
VersionCode: An identifier number that is defaulted to 1.
Application Appearance
Packaging your Application
Exercises 1 Describe the difference between testing and debugging application software. 2 Classify the common types of testing strategies. وزارة التعليم Ministry of Education 2024-1446
Describe the difference between testing and debugging application software.
Classify the common types of testing strategies.
3 Outline the main components of testing documentation. 4 State the two methods of distributing an application for Android phones. 5 Describe the differences between the two main types of Android packages. وزارة التعليم Ministry of Education 2024-1446 191