Develop internal training material for python testing

Закрито Опубліковано %project.relative_time Оплачується при отриманні
Закрито Оплачується при отриманні

I want to develop internal training content for writing good python unit and integration tests. There are three deliverables for this project:

* A longform document describing and exploring the subject matter in depth

* A 20 minute presentation walking through the content and examples

* An interactive tutorial / workshop applying the concepts in the document to concrete examples, with some automated evaluation based on coverage and hidden implementation bugs. This may be done either as a jupyter notebook, a dockerised training repository, an interactive webpage or similar, but ideally there should not be any backend necessary.

Familiarity with the subject matter is required, but I will be available to help develop and edit the content. The examples will walk through a simple microservices stack utilising the following python technologies:

* Flask HTTP server

* This interprets a REST query, validates the input and then dispatches the query to a microservice via a thrift RPC call

* Apache Thrift mid-layer microservice

* This implements permission checks and aggregates and interprets data into a series of database requests in one of the two data layers described below

* SQLAlchemy query constructed within the same service

* Translating a thrift request to a similarly-structured SQLAlchemy query

* Via another thrift microservice that uses mysql connector and raw SQL as a DAO service

A skeleton describing the content is provided below. It may be incomplete - if there is anything else to cover, please expand it or alter it. Please note that the examples do not have to be written from scratch - some existing skeleton code exists, just focus on the test structure and content.

Testing Best practices

* Test only public methods/functions

* Test only the external behaviour of a class or module, otherwise you are just making the implementation details harder to change

* Writing descriptive tests

* Each test should have a docstring describing the property being validated

* Quick note on TDD

* Keep tests DRY and isolated

* Test code is code too - share mocks and setup methods and keep it clean

* Avoid complex code in tests

* Tests need to be obviously correct - if you’re doing a lot of computation in a test, it is too complex.

* Data providers

* Don’t hard-code data, use data providers. This makes tests generalisable as property tests, too

* Golden Tests

* Quick note on hypothesis

* Avoid mocks & a note on DI

* Mocks are fragile - avoid them where you can. Your functions should be as much of a black box to your tests as possible. DI-like patterns help with this.

Mocking

* Mock at the service boundaries

* This tests as much of the real behaviour of your code as possible.

* Wrap your service boundaries with an adapter that isolates your code from the interface of the external system.

* Python mock library

* Basic usage, common pitfalls, examples, etc

* How to write good mocks

* Unit tests vs Integration tests

* What’s the difference? Why would you use either?

* When not to test

* Type systems and other static tooling

* Coverage vs defensiveness

* Enforcing Contracts

Test runners

* Nosetests, pytest

* Skipping tests, selecting tests, command line arguments, data providers[d][e][f]

* Coverage

* If it’s not covered, do you need it?

Tools: Pytest watch, pdb (and ptpdb), vscode integrations

Testing in the example stack

* Flask

* creating and using the flask mocks

* A simple test

* Thrift

* Using a local thrift server mock

* Pure python

* Testing a simple permission check

* SQL

* Testing using a local mysql instance

* SQLAlchemy

* Same as above, but with sqlalchemy set up

Advanced testing

* Hypothesis[g] and Property based testing / state machine testing

Python Тестування ПЗ Розробка технічних документів Test Strategy Writing Розробка ПЗ

ID Проекту: #23763478

Про проект

13 заявок(-ки) Дистанційний проект Остання активність 4 роки(ів) тому

13 фрілансерів(-и) готові виконати цю роботу у середньому за $254

george1205

Hi Client High-quality & Fast-delivery is promised! As a highly skilled full stack developer and I can help you perfectly. I am very confident with my skills and I'd like to help your business by doing my best. My clie Більше

$300 AUD за 3 дні(-в)
(10 відгуків(и))
5.7
haris021

I have Bachelors in Electrical Engineering and holds Masters degree in Energy Systems Engineering with strong research background. I have 6 years experience of programming and have been extensively working on python fo Більше

$350 AUD за 7 дні(-в)
(62 відгуків(и))
5.7
TopWritingGuru

i am professional in content writing. i will do my best.I am working in the field of writing for the last 10 years. I have managed 5000+ papers with a 100 percent result rate for my clients on different forums includin Більше

$10 AUD за 1 день
(91 відгуків(и))
5.5
hsh564cf84accd96

"Hi, Hope you are doing well! Thanks for sharing your project requirement with us. It will be our great pleasure to work on your project. I have checked your requirement, yes we can do it, because we already work on si Більше

$150 AUD за 7 дні(-в)
(40 відгуків(и))
5.4
twentyten10

I have decided of experience in Python testing , specially web application testing. If awarded I be will deliver on time

$160 AUD за 7 дні(-в)
(4 відгуків(и))
2.4
siddiquiuns

Hi there! I have read through and perfectly understood the available instruction for your project. My diverse skill set perfectly matches the project. It is my strong belief that you will be a very happy client after Більше

$10 AUD за 1 день
(0 відгуків(и))
0.0
codertag

Hello, I am gone through your requirement. I would like to prepare internal training material for your organisation. I am having 18 years of QA (unit | functional | integration | system | load | performance | etc test) Більше

$255 AUD за 7 дні(-в)
(0 відгуків(и))
0.0