Difference between persistence time and test function

Assignment Help Software Engineering
Reference no: EM133673721

Task: Unit test standards - AAA and FI[R]ST Overview

The 5.1P task asks to improve the Fast property of the [F]IRST principle following the AAA

standards and best practices. There is a fourth test function in WeatherControllerTest.java called testTemperaturePersist() which persists a temperature of a given hour using the controller and matches the persisted timestamp in hh:mm:ss format with the test function's recorded current time. Due to a delay executing the persistence action, there is a difference between persistence time and test function recorded time. This difference violates the Repeatable property of the FI[R]ST principle. You will need to come up with an idea including stopping the clock or fake the clock so that the unit test runs successfully all the time.

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 task5_1P.zip and update the WeatherControllerTest.java file as required.
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 (WeatherControllerTest.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.
Keep tests consistent with AAA
FIRST properties of good tests
JUnit's support for AAA.

Instructions
For this task you will need to
Follow instructions like 5.1P task. Download task5_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.

The test function of interest is testTemperaturePersist() which is currently commented out. Uncomment the function and observe the test behavior. You can comment out the code of other 3 test functions of 5.1P (testTemperatureMin, testTemperatureMax and testTemperatureAverage) and focus only on testTemperaturePersist(). You should keep the student id and name validating test functions.

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 and the console output.

Upload your folder to your GitHub account and take a screenshot.

Your Task

Your task is to:
Study WeatherController.java to understand the member functions of the controller.
Study WeatherControllerTest.java to understand the test function testTemperaturePersist().
This test fails due to a delay in persistence action. Your job will be to restructure the test or the WeatherController class as necessary so that the test runs without error.
Reflect on your strategy for dealing with this scenario.

Reference no: EM133673721

Questions Cloud

Discuss why we need both mocking and stubbing instead : Integration testing by mocking and stubbing dependencies - Discuss why we need both mocking and stubbing instead of any one of them with proper references
Create two separate functions satisfying both the conditions : Create two separate functions satisfying both the conditions of part B - (a) a loop with simple statement and (b) a loop with conditional statement
Explain the potential negative impacts on the company : Identify one of the 8 waste listed in the article and provide an example from a service industry company. Explain the potential negative impacts on the company.
Focus on basic SQL queries : This assignment will focus on basic SQL queries. The dataset on which you will execute the queries has been provided as SQL scripts.
Difference between persistence time and test function : Come up with an idea including stopping the clock or fake the clock so that the unit test runs successfully all the time
Comment out the method calls : It is now your task to write the methods that this program uses. Comment out the method calls until you are ready to use them,
Explain how you determine the initial cash flows : Explain how you determine the initial cash flows. Discuss the notion of sunk costs and identify the sunk cost in this project.
Azure directory connect : You are required to install Azure Directory Connect. You can either use custom settings or express settings for the installation process.
Identify use cases where some of these unit testing : Task - Unit test standards – AAA and [F]IRST - Identify use cases where some of these unit testing standards are difficult

Reviews

Write a Review

Software Engineering Questions & Answers

  Research report on software design

Write a Research Report on software design and answer diffrent type of questions related to design. Report contain diffrent basic questions related to software design.

  A case study in c to java conversion and extensibility

A Case Study in C to Java Conversion and Extensibility

  Create a structural model

Structural modeling is a different view of the same system that you analyzed from a functional perspective. This model shows how data is organized within the system.

  Write an report on a significant software security

Write an report on a significant software security

  Development of a small software system

Analysis, design and development of a small software system.

  Systems analysis and design requirements

Systems Analysis and Design requirements

  Create a complete limited entry decision table

Create a complete limited entry decision table

  Explain flow boundaries map

Explain flow boundaries map the dfd into a software architecture using transform mapping.

  Frame diagrams

Prepare a frame diagram for the software systems.

  Identified systems and elements of the sap system

Identify computing devices, which could be used to support Your Improved Process

  Design a wireframe prototype

Design a wireframe prototype to meet the needs of the personas and requirements.

  Explain the characteristics of visual studio 2005

Explain the characteristics of Visual Studio 2005.

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