Develop automated integration tests

Assignment Help Other Subject
Reference no: EM133576949

In in this lab, we will utilize advanced features of the Python unittest framework (mocks) to develop automated integration tests. You will work on developing integration tests for a weather client and a simple Square class, which uses the Math utility class from Week 2. The WeatherClient class performs RESTful API calls to the open weather platform to obtain current and forecast weather conditions for a given zip code.

In your unit/integration tests, you need to use mocks and patching features of the Python unittest framework to create necessary fake dependencies and stubs. Unit/integration tests MUST provide 100% code coverage of the WeatherClient and Square classes.

Readings:

Python unittest Mocks
Requests for Humans
Open Weather API
Steps:

Study attached python classes (weather_client.py and square.py) to get a sense of what these modules do. Pay careful attention to module dependencies.
Study the different functions (units) in each class and design a set of test cases that would result in 100% statement coverage.
Use the unittest framework to develop unit tests for each of the test cases identified in 2. Use mocks to inject necessary dependencies and provide stubs when needed.
Run your unit tests using the unittest runner and make sure all unit tests pass.
Use the coverage tool to generate a coverage report.
Deliverables:

Python unit test code for both weather_client and square modules.
Screenshot showing a successful run of all unit tests.
Coverage report.

Reference no: EM133576949

Questions Cloud

What are the stages in becoming an adult throughout : What are the stages in becoming an adult throughout the family life cycle?
What would you do to promote the merits : What would you do to promote the merits of compassionate release? As a politician running for re-election what are the reasons why you would be against medical
Discuss how to develop technological skills : Discuss how to develop technological skills to address the business issues. (Give an example of the organization you are aware of)
What are the risks inherent in such strategic positioning : what are the risks inherent in such strategic positioning? What are the benefits?
Develop automated integration tests : Develop automated integration tests. You will work on developing integration tests for a weather client and a simple Square class, which uses the Math utility
Implement a circuit in which each player inputs : The outputs (marked as P1 and P2) will be two LEDs, one which is lit if Player P1 wins, the other which is lit if Player P2 wins. If neither player wins then
How did the ihuman virtual patient encounter : How did the iHuman Virtual Patient Encounter case help strengthen your understanding of the chosen body system? What additional study techniques will
Analyze the impact that capitalist development has had on : analyze the impact that capitalist development has had on the following groups: 1) English peasants, Native Americans, African Americans, workers
How you would score on a measure of ambivalent sexism : Reflect on what you've learned about ambivalent sexism. Start with defining ambivalent sexism and its components. Reflect on your experiences

Reviews

Write a Review

Other Subject Questions & Answers

  Cross-cultural opportunities and conflicts in canada

Short Paper on Cross-cultural Opportunities and Conflicts in Canada.

  Sociology theory questions

Sociology are very fundamental in nature. Role strain and role constraint speak about the duties and responsibilities of the roles of people in society or in a group. A short theory about Darwin and Moths is also answered.

  A book review on unfaithful angels

This review will help the reader understand the social work profession through different concepts giving the glimpse of why the social work profession might have drifted away from its original purpose of serving the poor.

  Disorder paper: schizophrenia

Schizophrenia does not really have just one single cause. It is a possibility that this disorder could be inherited but not all doctors are sure.

  Individual assignment: two models handout and rubric

Individual Assignment : Two Models Handout and Rubric,    This paper will allow you to understand and evaluate two vastly different organizational models and to effectively communicate their differences.

  Developing strategic intent for toyota

The following report includes the description about the organization, its strategies, industry analysis in which it operates and its position in the industry.

  Gasoline powered passenger vehicles

In this study, we examine how gasoline price volatility and income of the consumers impacts consumer's demand for gasoline.

  An aspect of poverty in canada

Economics thesis undergrad 4th year paper to write. it should be about 22 pages in length, literature review, economic analysis and then data or cost benefit analysis.

  Ngn customer satisfaction qos indicator for 3g services

The paper aims to highlight the global trends in countries and regions where 3G has already been introduced and propose an implementation plan to the telecom operators of developing countries.

  Prepare a power point presentation

Prepare the power point presentation for the case: Santa Fe Independent School District

  Information literacy is important in this environment

Information literacy is critically important in this contemporary environment

  Associative property of multiplication

Write a definition for associative property of multiplication.

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