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

  Design a graphical user interface to support the use case

Design a graphical user interface to support the use case, using a standard set of graphical ‘widgets' such as those supported in .NET or Java Swing.

  Conduct testing on two open-source free applications

Using Partitioning and Boundary Value technique to conduct testing on two open-source free applications by choosing two components of each application

  Summarizes what an attack surface

Prepare a ½ to 1 page memo to your manager that summarizes what an attack surface is and why it is important to limit the attack surface of a system. Provide a few examples in support of your explanation.

  What is a silver bullet in software engineering

What is a silver bullet in software engineering? From the article "No Silver Bullet" by brooks.

  TWL604 Tech Work Integrated Learning Assignment

TWL604 Tech Work Integrated Learning Assignment Help and Solution, Torrens University Australia - Assessment Writing Service

  How does software differ from the artifacts produced

How does software differ from the artifacts produced by other engineering disciplines? How do software characteristics differ from hardware characteristics?

  As part of your job you should complete a 10-to-15 page

tonys chips has recently been sold to a new independent company. the new company has hired you to manage a project that

  Identify the correct development strategy

Identify the correct development strategy suitable for implementing the TO-BE diagram. Carry out some research on the Internet and look at reference books.

  Write the definition of the function min

Add the function min to the class arrayListType to return the smallestelement of the list. Also, write the definition of the function min and a program to test this function.

  create a Z schema that adequately describes the WTC system

ITECH7410 Software Engineering Methodologies Assignment. You are to create a Z schema that adequately describes the WTC system

  Q1 what is a test plan list out the processes that are

q.1 what is a test plan? list out the processes that are covered in a test plan.q.2 what is the need to identify test

  How can prototyping use in requirements engineering

How can Prototyping use in Requirements Engineering?

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