Issues in Coded UI Test Script bulk execution
Hi,
We are using Coded UI for one of the dotnet web application in our project. We have automated more than 1000 scenarios using Coded UI. We are using the 4.0 framework. We have created multiple order tests(OT) with
80 test scripts in an order test file and give it for execution.
We have observed that few of the scripts which gets successfully executed in the debug and Run mode are getting failed while executing the same using the order tests. However, if we re-create a new order test by putting the failed
script as the first script in the order test, then the script is getting passed in the execution, but the others are getting failed. PFB the example,
Suppose OT1 has T1,T2,T3 scripts in the same order i,e T1,T2,T3. all the scripts i,e T1,T2,T3 run perfectly and gets passed individually in the debug mode and run mode. But if we execute the OT1 using the MsOrderTest Batch file, then only T1
is getting passed and T2 and T3 are failed.
In another scenario, if the scripts are ordered as T2,T3 and T1. Then after the OT execution, the result is only T2 is passed, T3 and T1 are failed.
I could not understand why the scripts are getting failed. Can someone provide some help here.
Please note:: All the scripts are hand written and not the recorded ones.
Thanks,
Venkat.
Hi Venkat,
>> Suppose OT1 has T1,T2,T3 scripts in the same order i,e T1,T2,T3. all the scripts i,e T1,T2,T3 run perfectly and gets passed individually in the debug mode and run mode. But if we execute the OT1 using the MsOrderTest Batch file, then
only T1 is getting passed and T2 and T3 are failed.
Could you share us the error message screen shot or the details error message about the T2 and T3?
Based on your description, it seems that it caused by the script. To find the root cause, I will recommend you run the Order Test in the Visual studio. If it could work correctly, I assume that there is something wrong in the script, and it would be helpful
if you could share us the script. The link below shows how to run tests from Visual Studio.
# How to: Run Tests from Microsoft Visual Studio
https://msdn.microsoft.com/en-us/library/ms182470.aspx
In my option, you could replace the T1,T2,T3 with other three simple methods in the class to check whether the script could work correctly.
In addition, I will recommend you to try to run the T1,T2,T3 independent to check whether the result web page of T1 is not the start of the T2.
Best Regards,
Edward
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.
Similar Messages
-
Coded UI test script works in VS2010 but not in VS2012.
I have a test script for an application that adds 3 part numbers (i.e., rows) to a table displayed on the AUT web page. Each row in the table also contains an
HTMLInputButton called View Audit Trail. The purpose of the test script is to select the correct button, which then calls up the
Audit Details page for the selected part number. The code used in the test script driver is as follows (the same code is used for clicking on either an action button or a hyperlink contained within a table):
case "ClickTableItem":
// Note: An input example would be
03-0024-0-0001:Button>View Audit Trail
string[] keys = action[key].Split(':');
string cellvalue = keys[0].CheckGlobalValue(global); // The key data identifying which table row.
string[] objtypeANDobj = keys[1].Split('>'); // Data consists of the Object Type, and the Object to be clicked.
// Identify the table... (The name of the table from outside the
Switch statement.)
HtmlTable actionTable = (HtmlTable)map.GetType().GetProperty(key.FieldName).GetValue(map, null);
// Identify the individual table cell containing the key identifier...
HtmlCell cell = new HtmlCell(actionTable);
cell.SearchProperties.Add("ClassName", "HtmlTableCell");
cell.SearchProperties.Add("InnerText", cellvalue, PropertyExpressionOperator.Contains);
UITestControlCollection tablecells = cell.FindMatchingControls();
// Set the row index...
HtmlCell myhtmlcell = (HtmlCell)tablecells[0];
int myrow = myhtmlcell.RowIndex;
string smyrow = myrow.ToString();
HtmlCell myCell = new HtmlCell(actionTable);
myCell.SearchProperties.Add("RowIndex", smyrow);
#region Click on Hyperlink
if (objtypeANDobj[0] == "Hyperlink")
myCell.SearchProperties.Add("FriendlyName", objtypeANDobj[1], PropertyExpressionOperator.Contains);
UITestControlCollection testclickobjects = myCell.FindMatchingControls();
UITestControl tableclickobject = testclickobjects[0];
HtmlHyperlink myClicklink = new HtmlHyperlink(tableclickobject);
Mouse.Click(myClicklink);
logger.Write(" Action", "Table Select - Row: '" + cellvalue + "': Hyperlink '" + objtypeANDobj[1] + "' selected");
#endregion
#region Click on Button
else if (objtypeANDobj[0] == "Button")
// Search child level...
UITestControlCollection testclickobjects = myCell.FindMatchingControls();
UITestControl tableclickobject = testclickobjects.Where(btnCell => btnCell.GetChildren().Any(btnChild => btnChild is HtmlInputButton && btnChild.FriendlyName == objtypeANDobj[1])).First();
HtmlInputButton myClickbtn = tableclickobject.GetChildren().Where(btnChild => btnChild is HtmlInputButton).First() as HtmlInputButton;
Mouse.Click(myClickbtn);
logger.Write(" Action", "Table Select - Row: '" + cellvalue + "': Action Button '" + objtypeANDobj[1] + "' selected");
#endregion
break;
In VS2010, the correct button is always selected, and the correct audit page always appears. In VS2012, though, the correct button is always selected, but the green progress bar speeds across the screen and the test crashes, even though the message
log records the correct action. (It crashes because it can't find the verification information that the correct page was displayed, seeing as the correct page doesn't appear.) If I manually re-open the application, the table containing the added
part numbers is still displayed, and I can click on the appropriate View Audit Trail button and go to the correct audit page.
What really has me stymied, though, is that the script actually passed twice. Both times, though, either VS, the test script, or the app itself hiccupped, and only added 2 of the 3 part numbers to the table. As always, the correct button was
selected, but in these two cases the audit screen actually appeared, so the rest of the test passed successfully.
I've tried removing one of the part numbers, but the script still failed despite once again selecting the correct button. The first thing I thought of was re-mapping the web page objects using VS2012, but it turned out that they have the same properties
as with VS2010. Unfortunately, it didn't help. I've also tried changing the following parameters:
HtmlInputButton to HtmlButton
<PropertyCondition Name="ControlType">Button</PropertyCondition> to
btn
<PropertyCondition Name="Type">button</PropertyCondition> to
submit
<PropertyCondition Name="Class">PageButton</PropertyCondition> to
Button or btn
The only other thing unique is that the AUT for the VS2010 test script uses a different login screen than the AUT for VS2012 (different URLs for the login screens). Other than that, though, once the login screens are passed, the web pages accessed
are identical (i.e., the same URL).
Has anyone else run into a similar situation?Hi Jack,
Here is the applicable part of the error log. Unfortunately, it doesn't explain why the Audit page doesn't appear when you click on the View Audit Trail button. It only fails because it can't find the Return To Search button (which makes sense,
because the page wasn't opened). As you can see, I stuck a 60-second Wait step (Step 14) to see if the page would eventually appear, but it didn't.
Processing Step 12:
Data Entry: Selected radio button 'ActionTypeRadioInquiry': 'ON'
Data Entry: Entered 'AircraftTailNumber': '0201'
Action: 'Search' selected
Processing Step 13:
Action: Table Select - Row: '03-0024-0-0001': Action Button 'View Audit Trail' selected
Processing Step 14:
Action: 'Wait': System test paused for 60 seconds...
Processing Step 15:
Logging Entry Type: Error
Logging Entry Type: FailureAudit
System.String: <string> *** FAILED Step 15 ACTION: 'ReturnToSearch' Error 'The playback failed to find the control with the given search properties. Additional Details:
TechnologyName: 'Web'
ControlType: 'Button'
TagName: 'INPUT'
Id: 'ctl00_ContentPlaceHolder1_btnReturnToResults'
Name: 'ctl00$ContentPlaceHolder1$btnReturnToResults'
Failed to find any control that matched the value ctl00_ContentPlaceHolder1_btnReturnToResults for the search property Id.'</string>
System.String: *** FAILED Step 15 ACTION: 'ReturnToSearch' Error 'The playback failed to find the control with the given search properties. Additional Details:
TechnologyName: 'Web'
ControlType: 'Button'
TagName: 'INPUT'
Id: 'ctl00_ContentPlaceHolder1_btnReturnToResults'
Name: 'ctl00$ContentPlaceHolder1$btnReturnToResults'
Failed to find any control that matched the value ctl00_ContentPlaceHolder1_btnReturnToResults for the search property Id.'
Logging Entry Type: Error
System.Exception: <Exception><HelpLink /><Source /></Exception>
System.Exception: System.Exception: Exception in Step #15 from the 'PerformAction' module... ---> Microsoft.VisualStudio.TestTools.UITest.Extension.PlaybackFailureException: Step 15 ACTION: 'ReturnToSearch' error 'The playback failed
to find the control with the given search properties. Additional Details:
TechnologyName: 'Web'
ControlType: 'Button'
TagName: 'INPUT'
Id: 'ctl00_ContentPlaceHolder1_btnReturnToResults'
Name: 'ctl00$ContentPlaceHolder1$btnReturnToResults'
Failed to find any control that matched the value ctl00_ContentPlaceHolder1_btnReturnToResults for the search property Id.'
at WS.Tests.DataEntryUtil.PerformAction(Dictionary`2 action, Object map, Dictionary`2 global, Int32 stepNumber, LoggingProvider logger) in c:\Source\QMOTestUtilities\WS\WS\Tests\WSAutomation\DataEntryUtil.cs:line 1964
at WS.Tests.WSTest.ScepTest() in c:\Source\QMOTestUtilities\WS\WS\Tests\WSAutomation\WSTest.cs:line 193
--- End of inner exception stack trace ---
Logging Entry Type: Error
System.Exception: <Exception><HelpLink /><Source /></Exception>
System.Exception: System.Exception: DataDriven Test Execution Exception Caught ---> System.Exception: Caught Exception in Step #15 from the 'PerformAction' module... ---> Microsoft.VisualStudio.TestTools.UITest.Extension.PlaybackFailureException:
Step 15 ACTION: 'ReturnToSearch' error 'The playback failed to find the control with the given search properties. Additional Details:
TechnologyName: 'Web'
ControlType: 'Button'
TagName: 'INPUT'
Id: 'ctl00_ContentPlaceHolder1_btnReturnToResults'
Name: 'ctl00$ContentPlaceHolder1$btnReturnToResults'
Failed to find any control that matched the value ctl00_ContentPlaceHolder1_btnReturnToResults for the search property Id.'
at WS.Tests.DataEntryUtil.PerformAction(Dictionary`2 action, Object map, Dictionary`2 global, Int32 stepNumber, LoggingProvider logger) in c:\Source\QMOTestUtilities\WS\WS\Tests\WSAutomation\DataEntryUtil.cs:line 1964
at WS.Tests.WSTest.ScepTest() in c:\Source\QMOTestUtilities\WS\WS\Tests\WSAutomation\WSTest.cs:line 193
--- End of inner exception stack trace ---
at WS.Tests.WSTest.ScepTest() in c:\Source\QMOTestUtilities\WS\WS\Tests\WSAutomation\WSTest.cs:line 213
--- End of inner exception stack trace ---
Test Script Status: FAILED 'Test_Click_Table_Item': Execution Time: 00:02:03.7293717
The calling page is given a specific key value (M&E Part Number) which identifies the table row containing the correct
View Audit Trail button to select. The key for this test is
03-0024-0-0001, indicating that the test is to select the
View Audit Trail button in the third row of the table.
Without fail, the correct button is selected. Selecting this action button is
supposed to call the appropriate Audit page.
While there have been several test runs where the correct audit page does get displayed, most of the test runs will
not display the page, even though a significant Wait period has been inserted to allow the application additional time to process the page request.
I tried to attach the screen shots of the two pages in question, but wasn't allowed to because apparently my account hasn't been verified. If I can upload them or email them somewhere else, let me know and I'll give it a shot. -
Error whil re-playing the coded ui test cases for internet explorer download window
Hi,
I have to create a test automation project which opens the IE and downloads file.
I have recorded all the steps to download the file to local folder.
My requirement is I need to download the file to a specific folder and compare those files.
When I tried to replay the recorded step I am getting error while changing the folder location.
I can change the file name dynamically but cant change the folder path as the click event of address bar fails.
I have recorded below steps
Click on Save drop down
Click on Save As
Pop up opens as shown
I can change the file name at run tims by passing the file name as parameter and it is accepting
but when I try to change the address it thorws error stating could not find the control with given search properties. I have to pass the folder path as parameter to the test case.
Please help me in resolving this error.
Thanks,
Meenakshi Nagpal
not able to add images to this postHi Meenakshi Nagpal,
>>When I tried to replay the recorded step I am getting error while changing the folder location.
According to your description, could you please tell me how you record these UI actions for coded UI test? Is it handing code or using coded UI test Builder?
Could you please tell me if you are recording these actions and then you change the folder location or you change the folder location by handing code after you finished these actions recording and then get the error?
About your issue, I tried to download file to a specific folder using coded UI test builder, I found that it can playback successfully.
If you are hand coding your coded UI test, I suggest that you can try to record these steps using Coded UI Test Builder. Then
generate the code and then try to playback check if you can download the file into the
specific folder.
In addition, about this error: could not find the control with given search properties. I doubt that the target control did not be found by the searchproperties.
So I suggest you can try to add more searchproperties for the target control check this issue again.
I suggest you can also use DrawHighlight Method to check if the correct control is found
before you perform actions on the target control.
I find a blog about how to troubleshooting Record and Playback issues in Coded UI Test, you can refer it.
http://blogs.msdn.com/b/tapas_sahoos_blog/archive/2011/11/07/troubleshooting-record-and-playback-issues-in-coded-ui-test.aspx
Best Regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Issue running Load Test Scripts in an SSO environment
Hello,
I am performance testing some of our web applications that use SSO. Any script I record will play back fine but upon running them in the Navgation Editor I am getting HTTP/1.1 401 Unauthorized error messages. To combat this I configured Internet Explorer securuty settings to always prompt me for a username and password to access this site. I then used the dialog and authentication managers to have e-Tester automatically enter login information.
However even with all of that configured I still get the error message when playing back in the navigation editor or Load Teser. How can i get around this issue short of having a login page as oppossed to the dialog message i use to login now?Yes I understand your SSO authentication scheme as well as the 401 error you receive. What type of authentication is your SSO using? Is it NTLM or something different?
When you run in the navigation editor, which Options->Playback Agent have you chosen? The best agent to use is "Java Agent", though to debug authentication problems you should test the other 2 options, which is Thin Client with and without Wininet.
I did not mention it before, but if you are only interested in creating performance testing scripts you may consider the new OpenScript tool. In the near future you will also be able to use this tool for Functional UI scripting. See my comments in [this thread|http://forums.oracle.com/forums/message.jspa?messageID=3356340#3356340] -
Test Script execution failed.
I'm getting the Test Script Execution Error - "Test Script execution failed. Reason: The system cannot find the file specifiied"
This is happening to all my test script files. I can load the test script files, edit the test cases, etc, but cannot execute the test scripts
If I click on View Test Script Specification, they all come up, and the report shows all the cases in the test script.
If I look into the directory, they are all there, with the .tsc extension and a file type of TSC
I created a new TSC this morning, but with the same results
They were working yesterday. Since then, I did rename one of the test scripts, and changed my build platform from .NET to Java.
Any thoughts?
Thanks,
Allan Gibson
P.S. I also now note the my what-if analysis files do not run, and are getting a message: run time error '-2146233088 (80131500)': Batch process has failed. Reason: the system cannot find the file specified (OPA-E00241). When I press the debug button, I'm taken to a screen where the line "Call GetExcelCompilerProxy() .Analyze(ActiveWorkbood)" is highlighted in yellow.
Edited by: A Gibson on 11-Sep-2012 9:02 AM
Edited by: A Gibson on 11-Sep-2012 9:09 AMHey Allan,
It looks like it either can't find the Java component it needs to run or the test script for some reason. If you look in the bin directory of the OPM install (which is normally something like c:\program files\Oracle\Policy Modeling\bin) do you see a file called determinations-remote-clr.jar? If not it sounds like something's gone wrong with your install.
If so, can you run the test script in the standalone debugger? Also, if you look at the absolute path of your test script file, does it contain any non-ascii characters? If so, try removing those characters and see if it works.
Thanks,
Kristy -
Hi,
I have created some Coded UI Tests in a Test Project using Visual Studio Premium 2013 (Version 12.0.30723.00 Update 3).
Those Coded UI tests run just fine when I run them from inside Visual Studio (Go to Test Explorer and hit Run).
However If I try to run them using MSTest.exe or VSTest.Console.exe I am not able to.
When I run the tests using MSTest I get the following error:
Loading CodedUITests.dll...
CodedUITests.dll
Unable to load the test container 'CodedUITests.dll' or one of its dependencies.
Error details: System.IO.FileNotFoundException: Could not load file or assembly
'Microsoft.VisualStudio.TestTools.UITesting, Version=12.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot
find the file specified.
If I run them using VSTest.Console.exe I get the following error:
Starting test execution, please wait...
Warning: Unable to load types from the test source 'C:\PathToTestProject\bin\Debug\CodedUITests.dll'.
Some or all of the tests in this source may not be discovered. If you are running unit tests for Windows Store apps and referencing custom WinMD type then please visit
http://go.microsoft.com/fwlink/?LinkId=238340 for more info. Error details: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestTools.UITesting, Version=12.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified..
Warning: No test is available in CodedUITests.dll. Make sure that installed test
discoverers & executors, platform & framework version settings are appropriate
and try again.
I try to find this issue online and was not able to find anyone with a similar problem.I am not sure if there is something corrupted with my VS
instalation that may be causing this problem.
Could someone help me with this?
Thanks!
Brazeta
PS: This path "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PublicAssemblies" exists in the machine where I have VS and where I am executing the MSTest command. This path contains all the Microsoft test assemblies, including "Microsoft.VisualStudio.TestTools.UITesting.dll"Hi Edward
>> Do you mean that Coded UI tests run fine in VS, but failed with MSTest?
Yes, that is exactly the case!
>>Before you run with MSTest, have you changed the Coded UI project?
No. In Visual Studio I can run the Coded UITests by going to Text Explorer and click the run button. Without changing anything else, if I try to run them in using mstest or vstest.console I am not able to
>>Did you change the project after you run in vs?
No. The project did not change at all
>> Could you share us the MSTest command?
I run the commands in "Developer Command Prompt fro VS2012". the commands are:
MSTEST:
mstest /testcontainer:CodedUITests.dll
Microsoft (R) Test Execution Command Line Tool Version 11.0.50727.1
Copyright (c) Microsoft Corporation. All rights reserved.
Loading CodedUITests.dll...
CodedUITests.dll
Unable to load the test container 'CodedUITests.dll' or one of its dependencies.
Error details: System.IO.FileNotFoundException: Could not load file or assembly
'Microsoft.VisualStudio.TestTools.UITesting, Version=12.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannotfind the file specified.
VSTEST.CONSOLE
vstest.console CodedUITests.dll
Microsoft (R) Test Execution Command Line Tool Version 11.0.60315.1
Copyright (c) Microsoft Corporation. All rights reserved.
Starting test execution, please wait...
Warning: Unable to load types from the test source 'C:\MyProjects\CodedUITests\bin\Debug\CodedUITests.dll'.
Some or all of the tests in this source may not be discovered.
If you are running unit tests for Windows Store apps and referencing custom WinMD type then please visit
http://go.microsoft.com/fwlink/?LinkId=238340 for more info.
Error details: System.IO.FileNotFoundException:
Could not load file or assembly 'Microsoft.VisualStudio.TestTools.UITesting,
Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
The system cannot find the file specified..
Warning: No test is available in CodedUITests.dll. Make sure that installed test
discoverers & executors, platform & framework version settings are appropriate
and try again.
Information: Additionally, you can try specifying '/UseVsixExtensions' command i
f the test discoverer & executor is installed on the machine as vsix extensions
and your installation supports vsix extensions. Example: vstest.console.exe myTe
sts.dll /UseVsixExtensions:true
>>Have you set the platform (x64 or x32) in your test? If so, I think you could refer the link below:
The selected platform is AnyCPU
>>Was your UITesting in another dll? If so, you could refer the link below:
The tests are all in the CodedUITests dll. All tests were created inside a test project (called CodedUITests, they run ok if I execute them in VS but the show the abouve error if I run them using the Developer Command Prompt for VS2012).
I didn´t mention this before but I DO NOT have test controller and test agents installed in my PC! I just have Visual Studio installed (not 100% sure if I need the agent to run the UI Tests in the same PC where I have VS installed).
I hope this information may be usefull,
Best Regards,
José Brazeta
PS:
I just try to create a very simple UI Test in another PC where I have Visual Studio 2013 Ultimate (Versio12.0.30723.00 Update 3).
Using VS I created a new Solution with just 1 project (Coded UI Test Project) and recorded a very simple test (on IE and at the google page search for Coded UI Test and hit the search button).
After compiling the Coded UI Test project in VS I can see the test in Test Explorer and If I run the test it all goes ok.
Using the Developer Command Prompt for VS2012 if I navigate the the "Debug" folder of my project none of the following scripts will work:
mstest /testcontainer:CodedUITestProject1.dll
vstest.console CodedUITestProject1.dll
I get the same error that I show in the bigining of this post. -
Cannot load script for execution.
hi
iam creating the sisi package with in script task . script task was build successful . but when i was executive the ssis packages vs 2012.
it get error :Cannot load script for execution..
the code is
Microsoft SQL Server Integration Services Script Task
Write scripts using Microsoft Visual C# 2008.
The ScriptMain is the entry point class of the script.
using System;
using System.Data;
using Microsoft.SqlServer.Dts.Runtime;
using System.Windows.Forms;
using System.IO;
namespace ST_8cdbf584a74b48abb384d8f03cf42f4d.csproj
public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
#region VSTA generated code
enum ScriptResults
Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
#endregion
The execution engine calls this method when the task executes.
To access the object model, use the Dts property. Connections, variables, events,
and logging features are available as members of the Dts property as shown in the following examples.
To reference a variable, call Dts.Variables["MyCaseSensitiveVariableName"].Value;
To post a log entry, call Dts.Log("This is my log text", 999, null);
To fire an event, call Dts.Events.FireInformation(99, "test", "hit the help message", "", 0, true);
To use the connections collection use something like the following:
ConnectionManager cm = Dts.Connections.Add("OLEDB");
cm.ConnectionString = "Data Source=localhost;Initial Catalog=AdventureWorks;Provider=SQLNCLI10;Integrated Security=SSPI;Auto Translate=False;";
Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.
To open Help, press F1.
public void Main()
byte[] dataByte = null; String errInfo = "";
try
String sDirectory = Dts.Variables["User::Directory"].Value.ToString();
String CreatePartitionFileXMLA = sDirectory + "\\partitionssales20010701to20010731.XMLA";
String ProcessPartitionFileXMLA = sDirectory + "\\partitionssales20010701to20010731.XMLA";
// Create XMLA Script
Dts.Variables["User::CreatePartitions"].Value = ReadFile(CreatePartitionFileXMLA, errInfo);
if (errInfo.Length > 0)
Dts.Log("Error while reading XMLA file: " + errInfo, 0, dataByte);
Dts.TaskResult = (int)ScriptResults.Failure;
//Process XMLA Script
Dts.Variables["User::ProcessPartitions"].Value = ReadFile(ProcessPartitionFileXMLA, errInfo);
if (errInfo.Length > 0)
Dts.Log("Error while reading XMLA file: " + errInfo, 0, dataByte);
Dts.TaskResult = (int)ScriptResults.Failure;
Dts.TaskResult = (int)ScriptResults.Success;
catch (Exception ex)
Dts.Log("Error Message: " + ex.Message, 0, dataByte);
Dts.TaskResult = (int)ScriptResults.Failure;
public String ReadFile(String FilePath, String ErrInfo)
String strContents;
StreamReader sReader;
try
sReader = File.OpenText(FilePath);
strContents = sReader.ReadToEnd();
sReader.Close();
return strContents;
catch (Exception e)
MessageBox.Show(ErrInfo);
ErrInfo = e.Message;
return "";
how to solve this issue
pleasse help me..Hi sheshu0022,
Based on my research, the issue can be occurred due to something get corrupted in the script task. To fix this issue, please copy the code in the task, then rebuild the script task with the same code to test again.
The following similar thread is for your reference:
http://stackoverflow.com/questions/15165760/ssis-script-task-fails-on-server-with-error-cannot-load-script-for-execution
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
Coded UI Test now gets error about Newtonsoft.json not being found
I have a simple coded ui test to log into an application. The test is data driven and uses data from TFS. We are using a TfsTestAgent user (that has admin privs) that is on both the server and the agent systems. When I execute the test, I see the following
error:
The unit test adapter failed to connect to the data source or to read the data.
For more information on troubleshooting this error, see "Troubleshooting Data-Driven
Unit Tests" (http://go.microsoft.com/fwlink/?LinkId=62412) in the MSDN Library.Error
details: Could not load file or assembly 'Newtonsoft.Json, Version=4.5.0.0,
Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The
system cannot find the file specified.
The test run log (UITestLog.html) shows this:
I, 2524, 81, 2015/03/24, 13:27:09.815, 14494724802, QTAgent32_40.exe, ExtensionFramework : Reading extensions from custom dir 'C:\Program Files (x86)\Common Files\Microsoft Shared\VSTT\12.0\UITestExtensionPackages'
V, 2524, 81, 2015/03/24, 13:27:09.830, .\QTAgent32_40.exe, UnitTestExecuter.RunClassInitializeMethod: Acquiring m_runner.SyncRoot.
V, 2524, 81, 2015/03/24, 13:27:09.830, .\QTAgent32_40.exe, UnitTestExecuter.RunClassInitializeMethod: Acquired m_runner.SyncRoot.
V, 2524, 81, 2015/03/24, 13:27:09.830, .\QTAgent32_40.exe, CodedUITest : CodedUITestExtension.BeforeClassInitialize()
V, 2524, 81, 2015/03/24, 13:27:09.830, .\QTAgent32_40.exe, CodedUITest : CodedUITestExtension.AfterClassInitialize()
V, 2524, 81, 2015/03/24, 13:27:09.830, .\QTAgent32_40.exe, UnitTestExecuter.RunClassInitializeMethod: Released m_runner.SyncRoot.
V, 2524, 81, 2015/03/24, 13:27:09.830, .\QTAgent32_40.exe, UnitTestRunner.ExecuteDataDrivenTest: started.
V, 2524, 8, 2015/03/24, 13:27:10.377, .\QTAgent32_40.exe, CodedUITest : CodedUITestExtension.BeforeClassCleanup
V, 2524, 8, 2015/03/24, 13:27:10.377, .\QTAgent32_40.exe, CodedUITest : CodedUITestExtension.AfterClassCleanup
V, 2524, 8, 2015/03/24, 13:27:10.393, .\QTAgent32_40.exe, CodedUITest : CodedUITestExtension.Dispose()
I, 2524, 8, 2015/03/24, 13:27:10.393, .\QTAgent32_40.exe, UnitTestRunner.Dispose.
The interesting thing is that Newtonsoft.Json (aka Json.Net) isn't used in the project at all or any referenced libraries. From the above log, it appears to me that this is outside of the coded UI test since it isn't registered as a script exception.
The question then is, why did this start after changing the user that the Coded UI system runs tests under? I have tried reverting it back to the original user via a snapshot (and change the host environment in Test Manager). Doing so gives me the same result
above.
I'm looking for any ways to debug this further or ideas for fixes. I have tried the following as failed fixes:
including Newtonsoft.Json in the solution
copy over the library to c:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PublicAssemblies
revert to a known working build and run it (still get same error)
Big thing to note is that last item. I had builds that I know worked and worked on multiple machines. Using those builds on any machine produces the same result. What could cause that error message and be machine/test code independent?Hi JasonUnrein,
>> Could not load file or assembly 'Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.
Based on the error message and your description, I assume that the issue might be caused by your application instead of the Coded UI test. Were the project which you test a Web Api project? If so, I would recommend you log into the application directly without
the Coded UI project to check whether the application could work correctly. The link below might be useful to you:
# Could not load file or assembly 'Newtonsoft.Json, Version=3.5.0.0
http://stackoverflow.com/questions/6176841/could-not-load-file-or-assembly-newtonsoft-json-version-3-5-0-0
>> Big thing to note is that last item. I had builds that I know worked and worked on multiple machines. Using those builds on any machine produces the same result.
In my option, I will recommend you create a new web project and a new Coded UI test project to test instead of using the original project.
If I misunderstood you, please feel free to let me know.
Best Regards,
Edward
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey. -
Setting timeout for all the web test scripts in the solution
Hello,
I have around 16 web test scripts (using VSTS 2010 ultimate version) in my project (in a solution). By default the timeout set for each request is 60 sec. I need to increase the timeout to 180 sec. Currently, I am clicking on each request and modifying
the timeout parameter from the Properties window.
Is there any common setting for timeout available which would be acting across all the scripts?
Thanks.Hello,
We only can set Timeouts for a separate request in Visual Studio Web Test. There is no way to set Timeout for all requests in VS IDE. But you can write you own logic code using
Timeout Property in a web test plugin to set Timeout for all requests in a web test.
About how to write a web test plugin, please see:
How to: Create a Web Performance Test Plug-In
Best regards,
Amanda Zhu <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
Thanks
MSDN Community Support
Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later. -
Not able to spy objects in ie9 using coded UI Test Builder Spy, giving exception - "Interface not registered(Exception from HRESULT:0X...."
I am not able to capture any objects of my web application using coded ui recorder. Even though it is a simple html page, coded ui is showing a message -"Interface not registered(Exception from HRESULT:0X...."
Please give me solution , why this is hapening. I am having problem with object identification. Even I am not able to identify any object in google.com.
swapnanil senguptaTechnologyName is displaying as "MSAA" . But my application is a Webapplication.If I try to spy the google .com's search field then also TechnologyName is displaying as "MSAA". Is it any configuration issue of vsts codedui.
swapnanil sengupta -
Errors while running load test scripts in Oracle Load Test
I am a QA Analyst and this is my first time using the Oracle Load Test application. Acutally this is the first time I have done anything related to load test scripts. The Oracle Load Test version I am using is 9.10.0219. When I run some of the scripts with a user ramp up of 1 user per step, the load tests complete successfully. When I begin to adjust the number of VUs per step to 2 or more, I begin to get some of the following errors. By the looks of these errors can you provide any feedback as to whether these are issues with OLT or with the application I am running the load test against? Any help would be greatly appreciated.
Thanks
John
- ThinBrowserException occurred. HTTP response code: 500 Internal Server Error
- VariableNotFoundException occurred. Variable "web.jscript.httplbosinl1cccsmo_2468" not found for string: http://lbosinl1.ccc.smo.com:9595/Tmo/H5/portal/lipo_portal/{{web.jscript.httplbosinl1cccsmo_2468,Scenario}}
- VariableNotFoundException occurred. Variable "web.jscript.httplbosinl1cccsmo_5617" not found for string:
{{web.jscript.httplbosinl1cccsmo_1984,Suif_Context_Period_Date}}=
{{web.jscript.httplbosinl1cccsmo_5617,12/05/2010}}Hi,
It looks like an application issue since you are getting a HTTP 500. The other errors relate to the fact that ti can't resolve some dynamic values in needs to extract from the resonse content since the pages are different (probably due the 500 error).
Regards,
Jamie -
Hello Experts,
When i am executing my test script after recording the transaction,the system is running FB50 in the remote system but giving error in foreground mde.
Attached is the snapshot of error.
Abhishekthanks AP for your reply.
I have deleted and I have recreated the file with new recording but the error still ramains.
Can anybody assist to solve the issue ?
Thanks in advance. -
Some one please let me know what a test script is.....and how it is written...I need to write it for the HR modules....This is in context with support stacks being applied to SBX. ...and for testing that....Please also let me know if it is the responsibility of a functional consultant....
Message was edited by:
Anu RajagopalHi,
normally a test script contains information like; logical steps per given situation (input), per step an expected result (output), pre-conditions for execution of the test script, reference to requirement / design document. A separate area for test script final result incl. name of tester and sign-off the test result is required. The test script can only be marked as passed if all logical steps are finished succesfull according to the expected result(s).
(example: [Input] Go to menu x, click on y; [output] y runned succesfully)
The test-script is used to examine whether the system displays the desired behaviour under specific (in your case HR specific) circumstances.
And (from my point of view) a functional consultant can be responsible for test script creation and execution. It depends on (test-) organization.
Best regards,
Maurice -
How to attach input file in the Test Script in SECATT in ECC6 ?
Hi ,
How to attach input file in the Test Script in ECC6 in Tcode SECATT ?
For Testing in SECATT in ECC6, how to attach input file which contains multiple records ?
Best Regards,
PadhyHi and Welcome to the Community!
Since you have balance, and the issue is in your Work domain, you need to work with your server admins, as it's possible they are forbidding (via IT Policy) the ability to do as you desire.
Good luck!
Occam's Razor nearly always applies when troubleshooting technology issues!
If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
Join our BBM Channels
BSCF General Channel
PIN: C0001B7B4 Display/Scan Bar Code
Knowledge Base Updates
PIN: C0005A9AA Display/Scan Bar Code -
Error executing BPC test script
Hi,
We are on HANA. Our performance team is trying to execute a test script from HP Load Runner. We are seeing the below error
HTTP/1.0 500 Internal Server Error\r\n
<TITLE>500 SAP Internal Server Error</TITLE>\n
ERROR: XSLT: No valid XML source (termination: RABAX_STATE)<P>\n
Error -26612: HTTP Status-Code=500 (Internal Server Error) for "http://fmsap980.erps.intel.com:8000/sap/bpc/files?method=list" [MsgId: MERR-26612]
when we try and execute the same script manually within BPC front end, then no issues. everything is fine. Automating the test script is an issue.
any script , same error.
thanks for the help.Hey Ravi:
Any chance you found a solution to this?
Thanks
Kalinga
Maybe you are looking for
-
Want to use Time Capsule as external hard drive / Time Capsule als externe Festplatte
Can somebody tell me what steps I have to take to use my TC as an external hard drive? Thanks! / Kann mir jemand einmal genau erklären, wie ich meine Time Capsule als externe Festplatte für meine Fotos etc. nutzen kann? Mein 128 GB Mac Book Air kommt
-
Printer Properties Flashes and doesn't open
Hello Everyone, I am working in domain network and i had connected HP M1530 MFP shared printer. The printer is well connected and showing online but, when i try to click on properties after using Ctrl+P it was just flashing once and not opening the p
-
Order Settlement Rule for G/L
Hello friends I am deriving the Default settlement for order in G/L account for particular Activity Type. I am doing the chnage through the user exit EXIT_SAPLCOI1_027. The ABAP codes are as follows PMDFU_TAB-KONTY = ' '. PMDFU_TAB-FDIND = X_SAKN
-
Unable to view content on CD, Viewable in windows but not on Mac
I am unable to view the contents on a cd I made a while ago on a MS machine. In finder the CD has two folders both are empty (mp3's) and under the folder it says no items. I can see the files on the ms machine and on my mac through a terminal shell.
-
How can I access my IPhoto files on Bridge in Photoshop?
Hoe can I access my IPhoto files in Bridge in Photoshop?