Reference no: EM133673712
Pass Task: (a) Evidence learning for the topic, (b) Decision table testing using JUnit
Evidence learning for the topic
You need to demonstrate and provide evidence of your understanding of the topic this week. In this week Decision Table and Pathbased testing have been introduced briefly. These concepts are essential to design test cases involving one or more variables as of Decision tablebased testing and examining program structure and loops as of pathbased testing. You should reflect on these 2 testing strategies based on the content provided on the unit site and in the active learning session.
Submission details
For this task, you will need to go through the weekly learning materials in the unit site and participate in activities during the weekly active learning session.
Submit a pdf combining below items
Summary of learning in few slides of each topic item
Evidence of activities from the active learning session.
You want to focus on the following key ideas, and make sure you can explain them in relation to your submission.
Decision table testing
Path testing
Reflect how these test methods can be useful in real world scenarios.
Instructions
For this task, you will need to
Go through each topic presented in the unit site for this week including Decision table and path testing.
Create a powerpoint presentation and summarise learning of each topic into a few slides by including mindmaps, examples, usecases or any other evidence as suitable.
Use the same powerpoint file to add other related topics of the current week as required.
Append the same powerpoint with learning evidence from the active learning session.
Decision table testing using JUnit
As you now have created test cases using boundary value analysis, in this task you will write some test cases based on a concept introduced this week - Decision table testing. There is a loginform with 3 variables username and password fields along with a validation code. You will need to create test cases using decision table for combinations of 3 variables and implement those test cases using JUnit framework. A sample project is attached to show how to use the login function and a sample test case is included for your reference starting point.
Submission details
Use the instructions on the following page to carry out this task's steps.
For this task you will need to study the existing project task4_1P.zip where the LoginForm class in LoginForm.java file has a (i) login function which inputs username and password and returns boolean status and error message, if status is true, a validationcode is return as a message, and
(ii) validateCode function which inputs a validationcode string and returns true if it matches with an existing code string (which was returned earlier when login was successful), false otherwise. Main.java file shows how to create and use LoginForm using combination of 3 variables. LoginFormTest.java file contains a test function for a case of empty username and empty password.
Submit a pdf combining below items
A screenshot of your Eclipse IDE's (i) JUnit tab which shows test statistics including Runs, Errors and Failures and (ii) Eclipse console which shows outputs.
Your program's source code for tests (LoginFormTest.java)
A screenshot of your GitHub page where your latest project folder is pushed.
You want to focus on the following key ideas, and make sure you can explain them in relation to your program.
Decision table testing
Unit test case creation using JUnit.
Instructions
For this task you will need to
Download task4_1P.zip Java project and unzip it in a common folder (say, java_projects) which you will be using to store all the weekly projects.
Import the project (as a maven project) in Eclipse IDE.
Observe LoginForm class structure in LoginForm.java file which has a login function and validateCode function.
The Main.java file shows how to use login and validateCode functions of LoginForm. You can run Main.java (Run As > Java Application) and observe the output to understand how to create test cases.
You need to create a decision table with possible combinations of 3 variables like the one shown below. Symbols used: means empty, W means wrong/invalid, C means correct/valid, X means don't care. You can create in Excel or use tables in Word.
Username W W W C C C C C
Password W C W C W C C C
CON DITIO
NS Validation Code X X X X X X X X - W C
ACTI
ONS Expected
Result
You need to create JUnit test cases for each condition in your decision table. A sample JUnit test case is shown in LoginFormTest.java for you to start with. Run the test file (Run As > JUnit Test) to see the test statistics and the console output.
There are 2 test failures that you need to correct by providing your name and id in the first 2 test cases.
Run the test, take screenshot of test statistic.
Upload your folder to your GitHub account and take a screenshot.
Your task is to:
Study Main.java to understand how to use LoginForm for 3 variables including username, password and validation-code.
Create test cases as shown in the table above using decision-table with proper combinations of the 3 variables.
LoginFormTest.java contains sample test cases which represent one of the functions from the Main.java file.
You need to program test cases according to the cases you prepared in the tables.