How to organise your functional test cases

Assignment Help Software Engineering
Reference no: EM133673732

Task: Turn 8.1P into a STEM game for grade 4­6 kids

Overview
In 8.1P you have created a login.html page and connected it to a HTTP endpoint for authentication service. In this task, you will need to transform this application to a STEM game application consisting of several math questions for students of grade 4­6 which you would like to show during Deakin's Open day. After successful login, the next page shows a math problem to be answered by the user and click on submit. If the answer is correct, the next page shows another question, otherwise, the current page shows an error message asking the user to try it again. A new Java web project is created for this project to allow the page navigation to happen compared to the previous one where HTML files were outside of the Java HTTP endpoints which could only receive GET or POST requests but could not navigate through pages. Two sample math problems of addition and subtraction are created, and, in this task, you will need to do unit testing of the math operations and create the third math problem HTML page. You will need to create unit test cases for the math operations and do functional testing of the pages using Selenium. In addition, you need to create a third question in the pool which appears once the second question is answered correctly and ensure to do unit test and functional tests properly. Reflect on difficulties testing a path or sequence of pages - how to organise your functional test cases.

Submission details
Use the instructions on the following page to carry out this task's steps. Like 8.1P submission, you will need to submit below items ­
A PDF file listing unit test cases from developer point­of­view and functional test cases from test­team point­of­view. You can use a table to describe each test case name, description, intended result and test results.
A self­reflection on testing an integrated web application compared to what has been done in 8.1P.
Your reflection on functional testing sequence of pages using JUnit and following best test practices to organise your test cases.
Your program's source code. You can copy/paste your source code and test codes in PDF.
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.

Web application structure of separate HTML and Java endpoints within a single web project and its testability aspects.

Instructions

For this task you will need to
Download task9_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 the project folder structure as below ­
Directory structure MyServer.java

src/main/webapp Folder containing HTML files within the project. JSP files contain
HTML codes. You will need to create functional test cases for these HTML files using Selenium.
MyServer.java
Package: web Web application entry point, you have to run this file to start the
web server.
RoutingServlet.java
Package: web.handler Handles mapping between URL and endpoints, for example,
what Java function to call when URL contains /login.
LoginService.java
Package: web.service Authentication logic for /login URL routing. The login function
within this Java file is called to authenticate a user.
MathQuestionService.java
Package: web.service Contains math functions for STEM tests. These functions are
used to evaluate users when a math question is answered and a

submit button is pressed on the page. You will need to unit test
these functions.
Line 9­20 Web application starting point. Inside main() function, an application using a third­party Java library called Spring Framework is utilised. You can run this file to start the web
server.
The RoutingServlet.java file contains code to bind GET/POST requests to functions for each URL.
RoutingServlet.java

JSP file from src/main/webapp/WEB­INF/jsp folder. The URL part / indicates a
root URL without any sub­URL. https://127.0.0.1:8080/ is a root URL.
Line 26­30 Mapping of a GET URL part /login to a Java function loginView() which returns view­login.jsp HTML page. This page allows input elements and submitting a HTML form in terms of POST method which is handled in login() function
below.
Line 33­57 Mapping of a POST URL part /login to a Java function login() which contains logic to inspect login page data and call LoginService.login() function to authenticate a user. Upon successful login, a redirect­view request is issued to display page for URL part /q1 (line 46), otherwise the same /login view is
rendered with an error message which is generated in line 53.
As can be seen for each HTML page a GET mapping function is required to deliver the corresponding URL part specific page. If the page contains an HTML form, then a POST mapping function is required to serve the submitted form and both the GET and POST mapping functions have the same URL part (such
as /login shown above).
The GET method handling in RoutingServlet.java shows how to deliver the view view­ q1.jsp and the POST method handling shows how to retrieve two numbers and the user's response for mathematical addition question. HTML form input values are passed to MathQuestionService.java functions to get a response.

RoutingServlet.java

Line 75 Calls MathQuestionService.q1Addition() function with 2 numbers as received from the HTML POST submission.

MathQuestionService.java

Line 11­13 Q1Addition() function takes String format numbers, converts to double,
adds them and returns the result.
The Q1 math question page is shown below.
view­q1.jsp HTML rendered view

As you can see, if the numbers in Q1 form are submitted with empty values, they are passed as it is to MathQuestionService.q1Addition() function. This results an error page as below ­

Your job is to unit test MathQuestionService.java functions so the errors can be eliminated, if not, reduce the number of errors. You will need to set proper message in each questions POST mapping function (shown in step 4 above) so you can perform functional tests using Selenium for success and failure cases.

Your Task
Your task is to:
Study the project source and test codes and HTML code in JSP files to understand the project better.
Write unit test cases to improve functions in MathQuestionService.java. This requires you to ensure the error page is not displayed for the question pages (view­q1.jsp and view­q2.jsp) which results from mainly value error.
Write functional test cases to validate if the application meets minimum level of functionality to be a STEM math testing application.
Your goal should be to critically write test cases from both developer and test­team member's point of view to find flaws in the system.
Follow submission instructions on the first page and submit your work.

Reference no: EM133673732

Questions Cloud

Design program that gives simple math quizzes : Design a program that gives simple math quizzes. The program should display two random numbers that are to be added
What is your assessment of cracker barrels performance : What is your assessment of Cracker Barrel's performance over time? Do you agree with Biglari's critique of the company's performance?
Algorithm for determining the rhythm of the patient : You work for Zoll, a manufacturer of automated external defibrillators, and you are tasked with writing the algorithm for determining the rhythm of the patient'
Test driven development and CI : Test driven development and CI - Prepare a short story as a customer requirement for the function - why it is needed and how it should behave
How to organise your functional test cases : Describe each test case name, description, intended result and test results - explain them in relation to your program-how to organise your functional test case
Application hosted in cloud or on-premises : Is the application hosted in the Cloud or on-premises. If the application is hosted in the cloud is it hosted as Infrastructure as a Service (IaaS),
What is your recommendation to the boss : Your boss would like to use social media to screen candidates and has asked for your input. What is your recommendation to the boss?
Integrate web front­end with java api : Integrate web front­end with Java API back end as part of integration testing - Development of front and back ends may progress separately
Describe the qualities that you think are most important : Describe the qualities that you think are most important for someone to be recognized as a conscious leader. How to develop the qualities you described above.

Reviews

Write a Review

Software Engineering Questions & Answers

  Create a sequence diagram for each of the given scenario

Create a sequence diagram for each of the following scenario descriptions for a health club membership system When members join the health club, they pay a fee for a certain length of time.

  Role and influence the user plays in software development

You are a city transportation planner and are interested in improving the city's bus service. What types of analytic tools might help you do this, and how would you use them? Discuss the role and influence the user plays in software development

  What is cloud computing

Types of Cloud Computing (Private, Public, Hybrid)"

  Discourage vendors from attempting to build products

discourage vendors from attempting to build products add complexity to the purchase, setup and proper operation of peripherals from multiple vendors

  Design requires and the provide interfaces of two components

Design the Requires and the Provides interfaces of at least two components that might be used in a system in an emergency control room for a call-logging component that records calls made.

  Design a questionnaire to assess the usability

Design a questionnaire to assess the usability of a search bar on a website. Refer lecture notes for examples - What types of error is each likely to find

  How many flip-flops will be required to implement

How many flip-flops will be required to implement the mystery module, and how will signals c and r be connected to these flip-flops?

  Explain the three phases of the strategic planning process

describe the three stages of the strategic planning process and how they impact the management of technology and

  Evaluate alternatives to the company self-hosting the site

Evaluate alternatives to the company self-hosting the site. Build a Gantt chart using Microsoft Project or equivalent software, showing all tasks associated with implementing the Website.

  Qiestion about update statement

A table namedPoints varchar(81) has values stored in a column named Point. There are 2-columns in the Points table, X and Y.

  Designing e-r diagram for each product at pvf

Suppose that at PVF, each product. Design E-R diagram for this situation and state minimum and maximum cardinalities on the diagram.

  A firm that markets a drink called blackwater has hired you

a firm that markets a drink called blackwater has hired you to develop its marketing strategy.in this assignment you

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd