lundi 15 janvier 2018

PrintStream file location, testing on device cloud

I am web testing on a device cloud and want to safe some of the loading times to a .txt file. That for I use PrintStream that generates me a file in my project folder and adds the measured time of each step as seen below:

PrintStream ps = new PrintStream("Run"+run+"Test.txt")

-- any method --

PrintWriter out = new PrintWriter(new BufferedWriter(new 
   FileWriter("FinalRun"+run+"Test.txt", true)));
out.println("Step_" + step + "_initialLoad_" + ": " + elapsedTimeSec);
out.close();

Now the .txt file is generated correctly, but no times are added, if I run my script on a device cloud. Running the script on a desktop browser works out fine with every time added to the file.

What can I do? Change the output location? Use something different? I really have no idea.

Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire