1
votes

I am new to protractor and any response helps!! I see this Message: timeout: timed out after 30000 msec waiting for spec to complete Stacktrace: undefined

and I have afterEach cleans my test data. My log messages there are not being printed. Seems like it does not run afterEach. Also will afterEach be called when a test test fails normally (without timeout but other error)? If yes, is there a way for me to check for test result being pass or fail and do some cleanup actions based on that?

1

1 Answers

1
votes

No, Jasmine does not execute the afterEach block in the case of a timeout.

You can see how to hook up some code to run when a Jasmine test fails in the Protractor FAQ: https://github.com/angular/protractor/blob/master/docs/faq.md#how-can-i-get-screenshots-of-failures