Hi there,

I'm using webTest at the moment to validate our payment-service; the
functionality works meanwhile.

Within the property "accountBalance" is the amount the user had within
his deposit before and in "accountBalanceNew" after he had paid in. At
the moment the amount he is paying in is fixed, forthis is the
JS-variable "amount_dep".

The JS-snippet's mission is to fetch the two webtest-properties and
store them into JS-variables - substract them from each other and
finally substracts from this the amount the user has deposited.

When this is equals 0 the deposit has worked as it should >
amountDiffers false. Within the following "not"-step the value is
validated....

My problem: it doesn't work and at the moment I'm not sure if it's me,
JS or Webtest. Btw, the values have been aggregated by using
"storeRegEx" and are delimited by a comma(like 120,00).

         <scriptStep description="Calculate if deposit amount is
correct" language="javascript">
                amount_diff=0;
                amount_old=0;
                amount_new=0;
                amount_dep=10;
                amount_new=step.webtestProperties.accountBalanceNew;
                amount_old==step.webtestProperties.accountBalance;
                amount_diff=amount_new-amount_dep;
                if(amount_diff-amount_old==0) {
                        step.setWebtestProperty('amountDiffers', 'false');
                } else {
                        step.setWebtestProperty('amountDiffers', 'true');
                }
         </scriptStep>
         <not>
                <verifyProperty name="amountDiffers" text="true" />
        </not>

Thanks a lot,

cheers,

Alexander

-- 
Alexander Mannsfeld
Quality Assurance

GD GameDuell GmbH
Ackerstraße 14/15, 10115 Berlin
( +49 (0)30 288 768 811
+ +49 (0)30 288 768 299
[EMAIL PROTECTED]
Richtig spielen: www.gameduell.de

---

Firmensitz: Berlin,
Deutschland|Handelsregister: Amtsgericht Berlin-Charlottenburg, HRB Nr.
90891|USt-Id-Nr.: DE 813829498, Steuernummer: 37 / 225 /
20926|Verantwortliche Geschäftsführer: Kai Bolik | Michael Kalkowski | Boris 
Wasmuth

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to