CodeceptJS icon indicating copy to clipboard operation
CodeceptJS copied to clipboard

How do i create sections in test logs?

Open ecampii opened this issue 10 years ago • 2 comments

Ive started using codeceptjs and though the samples here shows scenarios of less than ten steps. Those are easier to read. But im using it to create e2e scenarios which spans for several pages, so using pageobjects which means bigger sets of I.**** steps.

Id like my logs to display something like this.

Scenario Title Open Home Page. • I am on page "Home Page" Log In Valid Users. • I see "Login Name" • I see "Password." • I type "User." • I type "Password." • I see "Submit" • I click "Submit" Search Item To Place In Cart.
• I see "this" • I click "here"

ecampii avatar Jul 12 '16 02:07 ecampii

I think you can still use console.log to print whatever you want on screen ) There is also this.debug() function, which is printed only in --debug mode

DavertMik avatar Jul 27 '16 20:07 DavertMik

not really working as expected. it writes all console.log strings on top before the first I.step is executed.

ecampii avatar Aug 09 '16 11:08 ecampii