Softwareontwikkeling met GitHub Copilot
Thalia Barrera
AI Engineering Curriculum Manager, DataCamp


def calculate_discount(price, discount_pct):
discount = price * (discount_pct / 100)
return price - discount
calculate_discount(50, 20) # → 40.0 ✓
Maar wat als...
pricediscount_pct > 100[screencast]
[screencast]

Eenvoudige gevallen
/tests
Speciale gevallen
Schrijf pytest-unittests voor calculate_discount voor: negatieve prijs, korting > 100%, en lege artikelenlijst. Gebruik parametrize voor edgecases.

/tests of een korte prompt
#file:/fixTestFailure als een test breekt
Schrijf integratietests voor de checkoutflow. Gebruik
#file:cart.pyen#file:payment.py. Mock de betaalgateway en controleer dat de orderstatus correct bijwerkt.
@workspace vindt automatisch relevante code#terminalLastCommand om fouten te debuggen
@workspaceSchrijf Playwright end-to-end tests voor de gebruikersregistratieflow. Controleer dat de bevestigingsmail wordt verstuurd.
[screencast]
Softwareontwikkeling met GitHub Copilot