From the course: Accelerate DevOps and Software Development with AI: Modern Tools and Workflows for Enhanced Software Delivery
Unlock this course with a free trial
Join today to access over 25,200 courses taught by industry experts.
Coding project: Create AI-assisted test cases in Python
From the course: Accelerate DevOps and Software Development with AI: Modern Tools and Workflows for Enhanced Software Delivery
Coding project: Create AI-assisted test cases in Python
- I've gone ahead and implemented the remaining three methods. If you want to compare your project to mine, I've saved the code in the exercise files for this course. We're going to move to testing these methods now. Let's sanity check the service with a few assertions. We'll use a prompt that says write a demo function for this book service that creates two books, gets the first book, lists all books, deletes one book, and verifies that it's gone. Use plain assert statements. I'm going to accept this suggestion. This looks pretty great. It's done exactly what I asked. Writing tests can be pretty tedious. So this is a great starting point. Next, let's have AI enumerate what we might miss. My prompt says for this pure-Python BookService, list edge cases to test. Include invalid inputs, boundary IDs, duplicate titles or authors, and very large lists. This is a lot longer than what I was expecting, but it's still a pretty…
Contents
-
-
-
-
(Locked)
What powers GitHub Copilot and ChatGPT?4m 20s
-
(Locked)
Prompt engineering for developers2m 38s
-
(Locked)
Role-based prompting for better code reviews2m 31s
-
Iterative prompting to guide AI to better code3m 35s
-
(Locked)
Coding project: Plan and test with AI tools1m 59s
-
(Locked)
Coding project: Speed up Python coding with smart prompts2m 26s
-
(Locked)
Coding project: Create AI-assisted test cases in Python2m 31s
-
(Locked)
Coding project: AI-powered docstrings for developers2m 18s
-
(Locked)
Coding project: Review Python code with AI1m 55s
-
(Locked)
Coding project: Navigating code with AI59s
-
(Locked)
Coding project: Refactor Python code with AI4m 6s
-
(Locked)
Case studies: AI wins and fails4m 22s
-
(Locked)
-
-
-