Ask a Question

FileNotFoundException Using testRunner - other posts on this I've found not helpful

SOLVED
richie
Community Hero

FileNotFoundException Using testRunner - other posts on this I've found not helpful

Hi,

 

I've never used the testRunner GUI functionality before and so thought I'd investigate.  I tried executing a single step test in a testsuite via testRunner but the execution fails with a FileNotFoundException - I'm gonna have to type out the message cos my Error Log indicates that it appears to be trying to create files within the C:/Program Files/SmartBear/ReadyAPI-2.7.0/bin directory

 

e.g.

FileNotFoundException:C:\Program Files\SmartBear\ReadyAPI-2.7.0\bin\TEST-Generate_CRM_Access_Token_TEST_ENV.xml

There's something weird going on with my Error Log functionality also - I've confirmed and reconfirmed that the warnings and errors reported in the testRunner logging window are NOT written to my error log (I've checked the UI, I've checked the ready-api-errors.log file in my window userprofile).

 

The testRunner logger reports 

 

FileNotFoundException: C:\Program Files\SmartBear\ReadyAPI-2.7.0\bin\TEST-Generate_CRM_Access_Token_TEST_ENV-Generate_CRM_Access_Token-REST-Request-0-PASS.txt

I've attached a screenshot to show the testRunner logging - but the filenotfound reported in the testRunner looks to be trying to write what I'm guessing is a temporary .txt file equating to the results of the teststep named 'REST Request' within the 'Generate_CRM_Access_Token' testcase within the 'Generate_CRM_Access_Token' testsuite.

 

The 'REST Request' step in my test simply hits https://login.microsoftonline.com to get a CRM access token - that's it.

 

Ignoring the obvious disparity between what's being recorded in my Error logging and the testRunner logging - would anyone know how to get this working so it doesn't return the filenotfound exception?

 

I've tried altering the read-only properties of ReadyAPI!'s bin directory to writeable - but windows keeps reverting it.

I've also tried numerous ways of altering the properties of the bin directory (via the windows advanced file/folder permissions within Windows file explorer) but it keeps reverting to readyonly.

 

The thing is - I've been using ReadyAPI! on my current laptop for the last 3 years and I've gone through each of the bin directories for each of those previous installations and the bin directories are always set as readyonly (as I'd expect as a directory within the Program Files parent.)

 

Is this normal behaviour to write files to the bin directory when the GUI testRunner is executed?

 

I've attached my errorlog, and an image of the testRunner logging

 

Cheers guys,

 

richie

 

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
9 REPLIES 9
nmrao
Champion Level 2

testrunner utility can be run for either testcase, test suite or project levels. I am afraid if that is designed for work for a step.



Regards,
Rao.
richie
Community Hero

Hey @nmrao,

Erm...yeah...i'm a little confused. The testrunner utility doesnt give you the option via the dropdown to execute a teststep and i wasn't.

Id selected a testcase within a testsuite. The particular testsuite id tried executing only had 1 testcase and one teststep, but that shouldnt mke any difference.

Just to reiterate if i wasnt being clear....i tried executing a testsuite.

Ive just tried executing the whole project and it still returns the same filenotfound exception when it attempts to write to the bin directory....

Cheers,

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
nmrao
Champion Level 2

You may need to change the settings to specify execution parameters.
Please refer documentation:
https://support.smartbear.com/readyapi/docs/soapui/running/automating/gui.html


Regards,
Rao.
TanyaYatskovska
SmartBear Alumni (Retired)

Hi @richie,

 

If you still see the issue, please contact our Support Team to investigate it:

https://support.smartbear.com/message/?prod=ReadyAPI

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager



Hey @TanyaYatskovska 

 

yeah - I played with  the switches but no use - my ReadyAPI! instance really doesn't like me using the GUI testRunner - so I'll raise a support call. (call ref #00372124)

 

Leaving ticket open for now - if support come back with an answer, I'll update the ticket accordingly,

 

cheers,

 

rich

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
TanyaYatskovska
SmartBear Alumni (Retired)

Thanks, Richie.

We will be waiting for the news from you.

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager



Hey!

 

Ok - I found what the problem was.- it's related to the 'Reporting'. 

 

I've never altered the settings before and the defaults are as the below screenshot

Capture.PNG

HOWEVER - when executing with the above settings - it fails with the FileNotFoundException. This is another ReadyAPI! defect.  According to the instructions, if not set manually, a 'reports' directory should be created in the directory that is equivalent to '${WORKSPACE}'.

 

This is not the case with ReadyAPI! v2.7.0.  If I leave the value set as ${WORKSPACE} - executing the GUI testRunner fails with the FileNotFoundException.  If I replace ${WORKSPACE} with the full path equivalent of $[WORKSPACE}, this works fine!

 

I know it's a bit rubbish to mark your own work as the solution - its like marking your own homework - but this is how I got around the problem 🙂

 

Cheers!

 

rich

 

 

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
nmrao
Champion Level 2

Which I want mean "Settings" and reference link provided in earlier reply.


Regards,
Rao.
richie
Community Hero

yeah @nmrao  - the link you provided as well as others I found provided the info I needed.

 

cheers,

 

rich

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
cancel
Showing results for 
Search instead for 
Did you mean: