UITestActionLog is empty after long running codedui tests - coded-ui-tests

Does anyone know anything about the UITestActionLog.html file ending up empty for long running test.
When I run just a few steps I get the file just fine with the expected content.
When I run my full test a bit over two hours the file ends up with just 28kb but with virtually no content. It just has this in it "Coded UI Test Log" on the top-left and "TOTAL TIME:" on the top-right.
I could not find anything about it on the web.
I am wondering if someone else has had this issue and what could be tweaked to make it work.
Thanks

This is happening because the images captured are too large when you have:
Playback.PlaybackSettings.LoggerOverrideState = HtmlLoggerState.AllActionSnapshot;
We changed that parameter to:
Playback.PlaybackSettings.LoggerOverrideState = HtmlLoggerState.ErrorAndWarningOnlySnapshot;
We don't have screenshots anymore but we have the details of the steps (i.e. the HTMl file is still generated)!
Next I will looks at the System.Drawing to see if we can't override the default screenshot size and encoding, this way we can restore the AllActionSnapshot but with lower resolution of screenshots....to be continued!

Related

Golem Task respons back with runtime error 2, can't determine the cause

Repo for all code I've been using is updated here . When I run the requestor script it exits with a runtime error 2 (File not found). I am not sure how to further debug this or fix it. So far I've converted my code over to a python slim docker image to better mirror the example. It also works for me when I spin up a docker image that typing and running "/golem/work/imageclassifier.py --trainmodel" works from root. I switched all my code to use absolute paths. I also did make sure the shebang (#!) uses linux end of file characters rather than windows before which was giving me errors. Fixed a bug where my script returns error code 2 when called with no args to now pass.
clf.fit(trainDataGlobal, trainLabelsGlobal)
pkl_file = "classifier.pkl"
with open(pkl_file, 'wb') as file:
pickle.dump(clf, file)
is the only piece I could think of that causes the issue, but as far as I can tell this is the proper way to pickle something in python. Requestor script is also heavily based on the simple service example and I tried to mirror my design to that. I just need help in getting more information while debugging, or guidance on how to move forward from here

How can I use Base64 image paths in AppleScript?

I have come up with an AppleScript, to monitor my VPN connection from VPN Tracker. So far I got the code working, meaning it shows the correct state as text. I created two PNG files, which I converted into Base64 and would like to use those as the status output, instead of just having text. The reason for the Base64 conversion of the images is, so I can share the script with others, without needing to share the actual images as well and expect the user to put them somewhere on his Mac.
I am however unsure of how to decode those Base64 strings in AppleScript, so it shows the actual image in the end.
This is the code I have so far (with the text output)
set conn_state to "" as string
if application "VPN Tracker 365" is running then
tell application "VPN Tracker 365"
try
if name of groups contains "group_name" then
set conn_state to state of connection of group ("group_name") as string
if conn_state = "On" then
return "VPN active"
else
return "VPN inactive"
end if
end if
on error
return "An error occured"
end try
end tell
end if
I did do some research on the internet but could not find anything that would help me, solve this problem, or I was maybe not using the right search terms.
Any help would be much appreciated. Thanks in advance
"The reason for the Base64 conversion of the images is, so I can share the script with others, without needing to share the actual images as well and expect the user to put them somewhere on his Mac."
Consider taking a different approach. The following solution will enable the image(s) to be bundled within your Applescript and avoid having to Base64 encode/decode them:
Save your AppleScript as an "Application" format via the AppleScript Editor.
Locate your resultant application via the "Finder"
Click on it while pressing the ctrl key.
Via the context menu choose "Show Package Contents".
Copy your .png image(s) to the Contents/Resources folder.
Then in your code access the path to the image as follows:
# Get the pathname to where this script resides in the filesyetem.
set pathToMe to (path to me) as text
# Create the full pathname to the image
set pathToPng to pathToMe & "Contents:Resources:img.png" as alias
# Just a demo to illustrate that the image path can be accessed.
tell application "Preview" to open pathToPng
Note: This example code assumes you've copied an image named img.png to the Contents/Resources folder. It firstly obtains the path to wherever your app is located and assigns the images path to the pathToPng variable
Edit:
Or, as #user3439894 kindly mentioned in the comments, simply use the following code to obtain the path to the image(s) directly:
# Create the full pathname to the image
set pathToPng to path to resource "img.png"
# Just a demo to illustrate that the image path can be accessed.
tell application "Preview" to open pathToPng
Note: This utilizes path to resource to obtain the path of the image, and the aforementioned steps 1-3 are still necessary

C# FileSystemWatcher & StreamReader gives "File is being used by another process" error

I have codes to watch a folder and open to read new files. When new file(s) fall into folder program works and do what it should do. Problem is related with other next file(s). If another file(s) fall into folder, program is giving "File is being used by another process" error message. I already read every similar questions in Stackoverflow and in Google. But non of them solved my problem. I don't think that problem is with my codes since when I assign same codes to a button and click manually after file falls to folder, program is working properly. But when FileSystemWatcher runs those codes it gives error at second time. Is there anyone who can advise a solution ?
I couldn't find the reason of the problem but I found my own solution.
I gave-up using FileSystemWatcher, instead I created a timer for 1 minute and at the end I check file quantity in the folder. If there is any change, I run the main codes. Now my problem has been fixed.

Issue with basic AS3 workers classes

I have followed Lee Brimelow's tutorials (part 1, part 2), but somehow my project doesn't work as expected.
Currently, publishing "src/Secondary.as" to "www/assets/swf/secondary.swf" works properly, however when trying to run "src/Main.as", an error shows up:
Exception fault: TypeError: Error #1007: Instantiation attempted on a non-constructor.
at Main/init()[/Volumes/DOCUMENTS/Tests/AS3/test-workers/src/Main.as:52]
at Main()[/Volumes/DOCUMENTS/Tests/AS3/test-workers/src/Main.as:32]
If anybody has time, you can look at my code on Github and maybe see where I screwed up? Thanks a bunch!
As your error message says: the problem raised in Line 52 in your Main.init()method. What you try to do there is to create a new instance of SecondarySWF. I would say that your embedment of Secondary class into SecondarySWF doesn't work properly, so it is not available in your init-method. You should set a breakpoint at the first line of your init-method and when the debugger reaches this point check what's in SecondarySWF. I expect that there's nothing in that variable, so what your new SecondarySWF() then means actually is new null().
Because you embed your secondary.swf with a MIME-type specified the Flex compiler ignores it because it is unable to detect the actual type of data in the loaded file. I found this post on Adobe's cookbook page that explains what you have to do in addition to adding the file using [Embed]. Hope this will fit your needs.

Problems came up in the following areas during load: Table

I have generated an excel file from xml. But i can not open it with Excel. Excel gives the following error opening it:
Problems came up in the following areas during load:
Table
Then it shows a message that the log file corresponding the error can be found at : C:/Documents and Setting/myUserName/Local Settings/Temporary Internet Files/Content.MSO/xxxxx.log
But i can not find Content.MSO folder in my windows. I checked folder settings and made all folders visible but i still can not access this folder. So that i can not analise the log file.
how could i find the generated log file?
I found the problem without analising the log file. i stil can not access the log file in temporary internet files. But i realised that i put a string(non-number) characters on a number-styled cell in Excel xml. So if you having the similar issues about your Excel file generated from xml, then have a look at if your cell values are appopriate with your cell data type.
If you type or paste the path of the log file into Explorer or your text editor of choice, you may find that the folder does exist, despite being invisible.
In my case it was a <Row> with an incorrect ss:Index
I was using a template and the last row had a fixed Index=100. If the number of rows I added exceeded 100, this last row had a wrong index and excel threw the error without any other message or log (MacOSX, Excel 15.25.1). I wish they printed more informative error messages, what a waste of our time.
Excel 2016. My error message was "Worksheet Settings". Path was pointing to non-existing file.
My cause of the problem was ExpandedRowCount not big enough for number of rows in Worksheet. If you add rows in XML directly (i.e. on a machine where Excel is not installed), make sure to increment number of rows in ExpandedRowCount.
yes.Even i too faced the same problem and problem was with the data type of cells ofexcel generated using xslt
In addition to checking the data being used vs "Type" assigned, make sure that the list of characters that need to be encoded for XML are indeed encoded.
I had a system that appeared to be working, but then some user data including & and < was throwing this error.
If you're not sure what's going on with your file, try http://www.xmlvalidation.com/ - that helped be spot the issue in a large file immediately.
I used this function to fix it, modified from this post:
function xmlsafe($s) {
return str_replace(array('&','>','<','"'), array('&','>','<','"'), $s);
}
and then run echo xmlsafe($myvalue) where you were just echoing $myvalue in your script.
This seems to be more appropriate for XML than htmlentities() or other options built into PHP.
I had the same issue, and the answer was - type of Cell was Number and some values doesn't converts to this type on my backend.
I had the SAME problem,
and its because de file is TOO BIG.
I try an extract from SAP, more little than the one with that make the error) and save it in XML file. and it WORK, no more error.
so maybe if you can save in 2 Excel files XML instead of 1 it will be good ;)
ALicia

Resources