D5: Modernization & Testing Scenarios
GH-300 GitHub Copilot exam practice questions · 10 flashcards
Question
Migrating Java 8 to 21?
1 / 10
Tip: Space flips the card, ← / → navigate.
Show all 10 Modernization & Testing Scenarios practice questions and answers
- Migrating Java 8 to 21?Use Copilot (or app modernization tools) to update APIs and dependencies with review.
- Converting callbacks to async/await?Ask Copilot to refactor selected code.
- Generating API docs?Ask for OpenAPI spec from code.
- Generating test data with constraints?'Generate 20 realistic customer records as JSON with valid emails'.
- Property-based tests?Ask for Hypothesis/fast-check tests.
- Security review prompt?'Review this function for OWASP Top 10 issues and suggest fixes'.
- Performance prompt?'Optimize this loop for large datasets; explain complexity'.
- Explaining regex?/explain on the regex.
- Upgrading dependencies?Ask for migration steps and code changes for breaking changes.
- Scenario: no tests exist for legacy module. First step with Copilot?Generate characterization tests before refactoring.