Get help with testing, discuss unit testing strategies etc.


Post by nickolay »

Hm.. So `t.exit()` has to throw the exception - no other way to interrupt the test. I'll revert that.

Post by nickolay »

Thank you for the patience. Reverted to always throw the exception and improved `waitFor` handling. Please verify the new behavior in the tomorrow nightly.

Post by paulb »

Nice work nickolay! It works as expected and will be a major improvement in our workflow. Thanks a lot, really appreciated!
Do you already know when the next stable release with this feature will be available?

Post by nickolay »

You are welcome! :) We are planning 5.5.0 release in a week or two (it is stable already and nightly is pretty much the same).

Post by paulb »

Sorry to bother you again but I found way to break your breakTestOnFail config. :(

When the test fails due to an exception within the tested code the next subtest is launched. Change 'Subtest 2' to:
st.it('Subtest 2', function(sst) {
	sst.chain(function(next) {
		sst.is(2, 2);
		sst.foo(); // sst.foo is not a function
		sst.waitForElementVisible('foo', next);
	}, function(next) {
		sst.waitForElementVisible('foo', next);
		sst.is(3, 3);
	});
});
When you run the given example, 'Subtest 3' is executed.

Post by nickolay »

He-he, thank you for the report, I'll check soon.

Post by nickolay »

Covered with the test and fixed.

Post by paulb »

Thanks again nickolay! Tested the nightly and works like a charm!

Post Reply