Tip: DO NOT CHANGE THE AUT THROUGH TEST CODE


#1

This came up in another thread, and thought it could be reposted here (slightly reworded).

I strongly advise against modifying the AUT through testing. If you modify the AUT, any test you make is no longer testing the AUT. You are testing something else entirely.

If the user can’t do it, through normal page interactions, your test should not do it, either.

You should strive to test what is there, not modify it so you can test something else instead.If you believe the page is behaving improperly, tell the developers.
If you believe the page is untestable, tell the developers.
If you believe the developers could modify the page to aid testing, ask them to do that.

_If you modify the page, your results (passes and failures) are meaningless.
_
Caveat: There are times when code injection (e.g. JavaScript) is technically modifying the AUT. If you do this, (yes, I do this a lot) you should strive to not make changes that affect the outcomes of the actions on the page.


WebUI: Inject Javascript function
#2

Yup!


#3

The gospel according to Russ, the evangelist:
1. Thou shalt not change the AUT through the test code. That it is an abomination.
2. Thou shalt not use the Object Repository.

:smiley:


#4

3. Thou shalt not eat thee the yellow snow, eat thee only the white snow for it is good.

And the Lord did look down on his little testers and he saw that they were good. So he maketh them the Katalon Test Studio and the great forums wherein they may dwell and test all the little codes that they had gathered there and they tested in the morning and in the evening and in that other time which is neither morning nor evening until they were sick of it.

Or something B)


#5

Amen. o:)