Database Testing with Pytest (PyGotham 2018 Advance Talk by Dan Clark)
jeu. 20 septembre à 00:30
• What we'll do
MEET-GREET: ~15 minutes of round-robin introductions and "audience requests", where attendees can raise their hand and ask for something (e.g. help with understanding a concept, a project, etc.). LIGHTNING TALKS: Three (3) lightning talks of 5 minutes each. Lightning talks can be an educational topic or concept, show-tell side project, Python career advice, or generally something of interest to the PYTHON community. If you're interested in giving a lightning talk, please contact me. MAIN EVENT: We have a special talk by Dan Clark who will be presenting the same at PyGotham 2018 ( https://2018.pygotham.org/talks/database-testing-with-pytest/ ) OVERVIEW: Testing relational database assests such as stored procedures, functions, and views can be awkward. However, Python can come to the rescue with pytest. We’ll dive into an example or two so that you too can leverage Python to test your own obtuse database structures. DESCRIPTION: Options for testing relational databases aren’t as renown as what’s available for application testing. We’ve all heard of unittest and pytest, but testing database objects are sometimes forgotten about, or tested through the application. However, pytest’s flexibility along with Python’s rich library of modules means that we can accomplish database testing in a way familar to Python developers. We’ll be exploring how to use PyTest to create a suite of tests for database objects. This will include setting up our testing environment, populating conftest.py with our fixtures, and using transactions to our advantage. As we’ll be testing against a real live Microsoft SQL Server database, we’ll see how to use pyodbc to set up a connection to it. Then we’ll dive into a few tests to show how we can gain confidence in our DB functions and stored procedures. Of course there are alternative ways to do this, and I’ll share a few of them along with the benefits and drawbacks of using pytest. If time allows we’ll show an Postgres equivalent to illustrate that this approach is not limited to a single product. • What to bring
Laptop to follow along • Important to know
Bring a friend! Spread the word! Learn something valuable! Please be sure to keep your RSVPs updated!! i.e. if you cannot attend the event, please release your spot at least 24 hours ahead of time to let others in and so that we can get an accurate headcount and room size. Thank you! LOCATION: Use GPS to find Dorothy Young Center for the Arts (Room 106) at Drew University in Madison, New Jersey. https://bit.ly/drew_doyo PARKING: Use GPS to find Tilghman Parking Lot at Drew University in Madison, New Jersey. https://bit.ly/drew_tilg_lot If you have trouble finding us, call campus security (non-emergency) at[masked].
Nous avons temporairement désactivé la possibilité de naviguer vers les tags.