Is console.log support for terminal / command line supported by trainee?

I have an Intern dependency where we need to deploy a Selenium server and use PhantomJS for our tests. We are using Jenkins and may need some more validation / debug output to the console, but the console.log will be suppressed from the test files to the terminal / command line

Is console.log supported for terminal / command line?

+3


source to share


1 answer


How it console.log

works intern-runner

depends on where your test code is running. The unit tests (specified in suites

) are run in the browser so that the output console.log

ends. There is currently no way to get console output from the browser for unit tests.



Functional tests (specified with functionalSuites

) drive the browser, but are actually executed in Node.js, so the output from statements console.log

in functional tests usually goes to stdout internship. The exceptions are log entries in blocks execute

and executeAsync

; as these blocks run in the browser where the log output ends. You can get browser logs in functional tests using getLogsFor('browser')

, but WebDriver log support is not compatible across browsers.

+4


source







All Articles