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

  Role of quality versus quantity in education

What conclusions does Hanushek draw about the role of quality versus quantity in education and their relationship to economic growth?

  Describe how chemicals have been used as wmd in the past

Describe how they have been used as WMD in the past during any war. Have terrorists used such weapons in the past? Explain.

  What are potential opportunities in your workforce

Name at least 4 ways you would structure your workforce? Be specific about authority structure, qualifications, employment status (FT employee or contractor).

  Why the academic and professional individuals were selected

Clearly and thoroughly explain in detail why the academic and professional individuals/teams were selected to support success in the MSN program.

  How does the distribution of political power affect the life

Debates about abortion, same-sex marriage, and health care have had profound impact on our political system. How does the distribution of political power affect the life chances of people who are under-represented in terms of race/ethnicity, class..

  What is position with respect to the legal action

What is your position with respect to the legal action taken against Harvard University on behalf of Asian American applicants?

  Describe the main effects of humanity fall into sin

Student responses should reflect critical consideration of the question and interaction with material from the Bible, the textbooks, and other related materials. The responses should not merely quote or paraphrase the content in the course texts...

  Common values in remote sensing

Radiance and reflectance are two very common values in remote sensing. Explain what they mean and why they are used in remote sensing

  What is primary care and the ten most common diagnosis seen

Discuss what is primary care, and the ten most common diagnosis seen in your clinic setting.

  Describe the problem-solving ways of learning

In your readings this week, you explored several real-world, problem-solving ways of learning. Each technique has its own unique criteria and advantage.

  Discern accurate information versus opinion

Effectively research the issue they advocate for and discern accurate information versus opinion.

  Demonstrate to your tutor that you have filled spreadsheet

Demonstrate to your tutor that you can edit OneDrive Microsoft Office's applications form Linux Lite and Access the Files from your Linux Virtual Machine

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