Forum Discussion
DLuks
14 years agoContributor
Yes, the Excel the sheet seems to be properly working as other Test Cases pointing to the same Excel sheet run just fine and other assertions within this particular Test Case also run without error.
It is only the case where the Test Case row needs to store a result variable for use on later rows and it is null, but it should have some value set.
Simple Example:
Excel sheet Var: Excel sheet assert
foofoo1 == result1
foofoo2 == foofoo1
foofoo3 == foofoo1 + foofoo2
The test request performs the following in the Script assertion:
context['foofoo1'] = TestRequestOutput.hitCount
JavascriptEvalAssert(context['foofoo1'] == result1)
- Loop here -
context['foofoo2'] = TestRequestOutput.hitCount
JavascriptEvalAssert(context['foofoo2'] == context['foofoo1'])
- Loop here -
context['foofoo3'] = TestRequestOutput.hitCount
JavascriptEvalAssert(context['foofoo3'] == context['foofoo1'] + context['foofoo2'])
- Loop here etc.-
As I said, the client and testRunner.sh run this fine. I only encounter the null object error when using Maven.
The null object error being, that context['foofoo1'] is null, when in fact there should be some value.
My initial question was, is there a way to store the variables on a different object other than 'context.
It is only the case where the Test Case row needs to store a result variable for use on later rows and it is null, but it should have some value set.
Simple Example:
Excel sheet Var: Excel sheet assert
foofoo1 == result1
foofoo2 == foofoo1
foofoo3 == foofoo1 + foofoo2
The test request performs the following in the Script assertion:
context['foofoo1'] = TestRequestOutput.hitCount
JavascriptEvalAssert(context['foofoo1'] == result1)
- Loop here -
context['foofoo2'] = TestRequestOutput.hitCount
JavascriptEvalAssert(context['foofoo2'] == context['foofoo1'])
- Loop here -
context['foofoo3'] = TestRequestOutput.hitCount
JavascriptEvalAssert(context['foofoo3'] == context['foofoo1'] + context['foofoo2'])
- Loop here etc.-
As I said, the client and testRunner.sh run this fine. I only encounter the null object error when using Maven.
The null object error being, that context['foofoo1'] is null, when in fact there should be some value.
My initial question was, is there a way to store the variables on a different object other than 'context.
Related Content
- 12 years ago
- 3 years ago
- 3 years ago
- 3 years ago