-
Notifications
You must be signed in to change notification settings - Fork 16
WUnit Wollok Unit Testing
Fernando Dodino edited this page Aug 31, 2019
·
11 revisions
The whole flow of testing begins when a user requests a .wtest
file to be tested:
Before Wollok Launcher starts, we need to setup some things: WollokLauncherParameters object has
- a
tests
flag pointing totrue
value - and a
testPort
number (WollokTestLaunchDelegate setstestPort
toWollokContextStateNotifier.listeningPort
, from the UI-VM)
WollokLauncherModule
has sets the test reporter to the corresponding one:
-
WollokRemoteTestNotifier
if launcher was run from Wollok IDE -
WollokConsoleTestsReporter
if launcher was run from wollok-cli
Wollok Launcher calls Wollok Interpreter which in turn calls to the WollokInterpreterEvaluator | WollokLauncherInterpreterEvaluator
.
WollokInterpreterEvaluator delegates to several dispatch methods, but one of them is the main for tests/suites: WollokLauncherInterpreterEvaluator.evaluate(WFile)
. If you need to change the way tests are evaluated, this is the right place. Take a look into SuiteBuilder
class.