We can create a Subroutine in Qlik to allow us to assert the equality of statements
This subroutine can be modified to work with strings, to exit script on failure, to log a failure in a table, or for greater then / less than / other comparisons
SUB Assert (mAssert, mExpected)
IF $(mAssert) = $(mExpected) THEN
TRACE $(mAssert) = $(mExpected) as expected;
ELSE
TRACE ERROR - $(mAssert) <> $(mExpected);
ENDIF
END SUB;