This is a migrated thread and some comments may be shown as answers.

NullReferenceException from ArtOfTest

3 Answers 57 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 13 Feb 2015, 09:28 PM
Hi
Whilst running my WPF test I am occasionally getting a NullReferenceException error thrown inside my application but the stack trace implies it came from the test runner. See attached.
It always happens just after a RadWindow has been confirmed by a test step, but not every time.
Can you explain how I am seeing this ArtOfTest exception inside my application?
Do you know what might be causing it?
Test Studio version is 2014.4.1411.0
Thanks,
Mike.

3 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 16 Feb 2015, 08:08 PM
Hello Mike,

The error message sounds like a timing race bug in Test Studio. I tried to reproduce it but with no success. Can you share with me a test that this problem happens in, and point out the test step it's happening in?

Also, can you reproduce it using the attached sample application? I really need a way of reproducing this so I can have our developers have a look.


Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Mike
Top achievements
Rank 1
answered on 23 Feb 2015, 12:10 PM
Hi Cody
I have tried to reproduce it in a test app but with no luck.
I have switched to using a traditional MessageBox instead of a RadWindow and this works fine.
Attached is the test which fails with the NullReferenceException error. It always fails on the 2nd iteration of "Main\Zero AVAs Position Level\ImportFile" immediately after step 6 "Click OKRadbutton".

I also have another issue in this test - in the HandleOpenFileDialog test, I have two steps which both handle a file open dialog. #1 uses a TypeText method and #2 used the inbuilt OpenFile dialog handler. Both of these are using the extracted variable "OpenFileDialogFilename" (which is set in the parent test). The TypeText method works fine but the OpenFile dialog method doesn't pick up the OpenFileDialogFilename to which it is bound - the dialog opens and just sits there. Any ideas why #2 doesn't work?
Thanks,
Mike.


0
Cody
Telerik team
answered on 23 Feb 2015, 10:41 PM
Hello Mike,

Regarding the NullReferenceException: Thank you for the test project. Unfortunately since I cannot run the script I cannot reproduce the problem, which blocks us from investigating any further.

Regarding the OpenFileDialog handler, where/how does "OpenFileDialogFilename" get set? The test HandleOpenFileDialog is not bound to any data source, nor do I see ImportParentDataSource checked as shown in the attached screen shot. Is it set in some parent test via SetExtractedVariable?

I suspect you may be running into a known issue that was recently fixed. You may not have upgraded to a version that contains the fix. The workaround is to NOT leave the download path empty in the test steps property. Test Studio won't use it, just make sure the path you enter is of legal syntax.


Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Mike
Top achievements
Rank 1
Answers by
Cody
Telerik team
Mike
Top achievements
Rank 1
Share this question
or