clj-commons / etaoin

Pure Clojure Webdriver protocol implementation
https://cljdoc.org/d/etaoin
Eclipse Public License 1.0
908 stars 95 forks source link

Improve coverage of test cases in test suite #640

Open dgr opened 3 weeks ago

dgr commented 3 weeks ago

Problem/Opportunity Today, most of the tests in the Etaoin test suite are positive tests that validate that Etaoin can do something. They test the "happy path." There are little to no test cases that validate Etaoin's behavior in error conditions.

Proposed Solution The behavior of each API call under error conditions needs to be understood (see issue #639) and then tests written to validate the documented behavior.

Alternative Solutions None. This is just grunt work.

Additional context It always sucks writing negative test cases, but they're pretty important, particularly for something like Etaoin that purports to work across multiple browsers. Very few users have the time or ability to debug error cases across multiple browsers. The Etaoin project infrastructure does this routinely, however, so all that needs to be done (he says, blithely, waving his hands) is to add negative test cases to the existing Etaoin test suite.

dgr commented 3 weeks ago

Changed name to reflect that it isn't just about negative tests, though those are very important.

lread commented 2 weeks ago

Ok, but please be aware that some % of test coverage is not a goal. Once you run a coverage tool, it can be tempting to strive for 100% coverage. That is not a goal for Etaoin and never will be.