assert_
glossary ↓ downloads
track: java · selenium
suite 02 · suite test

Suite test: Java foundations

7 questionsevery test must pass to merge

This is the suite's regression gate. Answer every question, then run the suite. Wrong answers show an explanation — read it, then re-run. In this course, like on a real team, you don't merge on a red build.

01.How do you correctly compare two Strings for matching text?
== asks “same object in memory?”; .equals() asks “same text?” — which is what a tester means. Worse, == sometimes accidentally works, hiding the bug.
02.Best type for a cart total like 149.97?
Decimals need double. int is whole numbers, boolean is true/false, and storing money as a String makes math impossible.
03.for (String browser : browsers) reads as…
The for-each loop is your test case's own language: run these steps once per item. It's why checking 300 data rows costs the same four lines as 3.
04.A method that fetches state for an assertion (like a banner's text) should…
Actions return void; questions return values. That separation becomes the backbone of your page objects.
05.invalidEmails.get(0) returns…
Indexes start at 0 in Java (and nearly every language). First = get(0), second = get(1).
06.Which structure best models one row of your test-data spreadsheet (username, password, role)?
A Map is labeled values: key → value, like named columns. A List of Maps is the whole spreadsheet — exactly what data-driven frameworks feed tests.
07.In the OOP sense, encapsulation gives the Page Object Model its power because…
When the page changes, the inside of the class changes; the outside stays stable — so every test heals with a one-file fix.
passing marks this suite test complete on the roadmap · revision aid: the suite cheatsheet
← Intro to OOP — why frameworks look the way they do Web fundamentals →