Please find the assignment instructions as below
Order ID 33973
Please find the assignment instructions as below
Please clearly identify the scope where you will be able to
Do the assignment or part of assignmentSupport me when I am doing the assignmentSpecify the availability (time and duration) when you can be contacted over Whatsapp or Google Meet
Assignment : Testing the MFA Server
Overview
This assignment deals with input partitioning,boundary-value analysis,and control-flow testing;and a bit of mutation analysis.
You are given a specification and a program that implements that specification.The aim of this assignment is to test the program using the different techniques,and to analyse the difference between them.
You are expected to derive and compare test cases,but you are not expected to debug the program.
The assignment is part laboratory exercise because you are expected to write a JUnit driver program to run your test cases automatically.Some exploration may be needed here.The assignment is also part analysis exercise as you are expected to apply the testing techniques to derive your test cases,and to compare them.Finally,the assignment is also part competition,as your solutions to various tasks will be evaluated against all other submissions in a small tournament to measure its effectiveness and completeness.
Your tasks
Task 1 -- Equivalence partitioning
Using the specification,apply equivalence partitioning to derive equivalence classes for the following methods in the API:register,login,respondToPushNotification,faceRegonisedandgetData.
Document your equivalence partitioning process for each method using only test template trees,listing the assumptions that you make(if any).You should have five trees:one for each method.You will be markedonlyon your test template trees(plus any assumptions listed),so ensure that they are clear and concise.
You can omit some nodes to improve readability,provided that it is clear what you intend.For example,if I was testing a book store and I wanted to test all seven Harry Potter books,I would create nodes for 1 and 7,and then use``ldots''in between them to represent the other five books.
Note that as part of your input domain,you will have to consider the instance variables.These are not parameters to any of the methods,but they areinputs.
Do your set of equivalence classes cover the input space?Justify your claim.
Task 2 -- Junit test driver for equivalence partitioning
Select test cases associated with your equivalence classes,and implement these in the JUnit test driver namedtests/swen90006/mfa/PartitioningTests.java.UseoneJUnit test method for each equivalence class.For each test,clearly identify from which equivalence class it has been selected.
NOTE:When implementing tests for one method,you may use other methods to check that the first method has worked as expected.Similarly,sometimes you may be required to execute other methods in the class to get the instance into a state that is testable(see the example inPartitioningTests.java).
Task 3 -- Boundary-value analysis
Conduct a boundary-value analysis for your equivalence classes.Show your working for this.Select test cases associated with your boundary values.
Task 4 -- Junit test driver for boundary-value analysis
Implement your boundary-value tests in the JUnit test driver calledtest/swen90006/mfa/BoundaryTests.java.As before,useoneJUnit test method for each test input.Push this script back to you git repository.
Note that the BoundaryTests JUnit script inherits PartitioningTest,which means all tests from PartitioningTests are including in BoundaryTests.A JUnit test is just a standard public Java class!You may choose to remove this inheritance,but you may also use it to your advantage to make the BoundaryTest script easier to create.Overriding an existing test will replace it in the BoundaryTest sscript.
Task 5 -- Multiple-condition coverage
Calculate the coverage score of your two test suites(equivalence partitioning and boundary-value analysis)usingmultiple-condition coverageeach the five methods,as well as those methods inMFA.javathat they call;that is,isAuthenticated.
Show your working for this coverage calculation in a table that lists each test objective(that is,each combination for multiple-condition coverage)and one test that achieves this,if any.
NOTE:You do NOT need to draw the control-flow graph for your solution.
You will receive marks for deriving correct coverage scores and showing how you come to this score.No marks are allocated for having a higher coverage score.
Task 6 -- Mutation selection
Derive fivenon-equivalentmutants for the MFA class using only the nine Java mutation operators in the subject notes.These mutants should be difficult to find using testing.Insert each of these mutants into the filesprograms/mutant-1/swen90006/mfa/MFA.java,programs/mutant-2/swen90006/mfa/MFA.java,etc.
All five mutants must be non-equivalent AND each mutant must be killed by at least one test in your JUnit BoundaryTest script to demonstrate that they are non-equivalent.They must only be in code that is executed when calling one of the four methods tested in Task 1.
Importantly,do not change anything else about the mutant files except for inserting the mutant.
Each mutant must change exactly one line ofMFA.javafor each versionmutant-1,mutant-2,etc.
Task 7 -- Comparison
Compare the two sets of test cases(equivalence partitioning and boundary-value analysis)and their results.Which method did you find was more effective and why?You should consider the coverage of the valid input/output domain,the coverage achieved,and the mutants it kills.Limit your comparison to half a page.If your comparison is over half a page,you will be marked only on the first half page.
The System: Multi-factor authentication (MFA)
The system that you will test is a simple multi-factor authentication(MFA)server.Strictly speaking,it implemented a three-factor authentication using: (a)passwords;(b)access to physical devices;and(c)facial recognition enabled or used.Once a person has authenticated,they can add and read generic data records.
A description of the methods for MFA and its implementation can be found in the fileprograms/original/swen90006/mfa/MFA.java.
For simplicity for the assignment,the database is implemented as a Java data structure.
Building and running the program
The source code has been successfully built and tested on JDK 11 but should also work with some earlier and after versions of Java.
The filebuild.xmlcontains an Ant build script,should you choose to use it.The README.md file in the top-level folder has instructions for using this.
There are two JUnit test scripts intest/swen90006/mfa/.You will need to modify each of these to complete the tasks.You can run these by compiling and running as a class,but you will need to include the library files in thelib/directory on your classpath.
To compile,run:
ant compile_origTo run the test scripts on the original(hopefully non-faulty)implementation,use:
ant test -Dprogram="original" -Dtest="PartitioningTests"
or
ant test -Dprogram="original" -Dtest="BoundaryTests"
To run a test script on the first mutant,use:
ant test -Dprogram="mutant-1" -Dtest="BoundaryTests"
Results for the tests can be found in theresults/folder.
To clean all class files,run:ant cleanMarking criteria
Criterion Description Marks
Equivalence partitioning Clear evidence that partitioning the input space to find equivalence classes has been done systematically and correctly. Resulting equivalence classes are disjoint and cover the appropriate input space 6
Boundary-value analysis Clear evidence that boundary-value analysis has been applied systematically and correctly, and all boundaries, including on/off points, have been identified 3
Control-flow analysis Clear evidence that measurement of the control-flow criterion has been done systematically and correctly 2
Clear and succinct justification/documentation of which test covers each objective 2
Discussion Clear demonstration of understanding of the topics used in the assignment, presented in a logical manner 1
JUnit tests Unit scripts implement the equivalence partitioning and boundary-value tests, and find many mutants, including the staff mutants 4
Mutants Selected mutants are valid mutants and are difficult to find using tests 2
Total 20