CS FundamentalsHardProduct-company placement
Instead of hand-picking examples, a developer states that for any list xs, sorted(sorted(xs)) == sorted(xs) and len(sorted(xs)) == len(xs), and a tool generates hundreds of random lists, shrinking any failure to a minimal case. What is this?
- A. Mutation testing
- B. Property-based testing
- C. Fuzz testing of network inputs only
- D. Pairwise testing
Correct answer: B. Property-based testing
Property-based testing (QuickCheck, Hypothesis) checks general invariants against generated inputs and shrinks counterexamples. Mutation testing changes the program, not the inputs.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- A password must be 8-16 characters long and contain at least one digit. Using weak equivalence partitioning, where all valid classes can…
- A web form has exactly two parameters: browser (Chrome, Firefox, Safari) and OS (Windows, macOS, Linux). How many tests does all-pairs…
- A team has run the same 300 regression tests every release for two years. They now find almost no bugs, yet customers report new ones in…
- A product passes every test and has almost no defects, yet users reject it because it does not solve their actual workflow. Which testing…
- Risk scores are likelihood x impact, each rated 1-5. Feature A: 4 and 2. Feature B: 2 and 5. Feature C: 3 and 3. Feature D: 5 and 1. In…
- Running a regression suite manually takes 40 hours per cycle. Automating it costs 300 hours up front; afterwards each cycle needs 2 hours…