Test fails with error: Unable to load DLL 'ieframe.dll': Not enough storage is available to process this command. (Exception from HRESULT: 0x80070008)
-
quinta-feira, 8 de março de 2012 17:14
I have a test suite that contains both codedui tests and web tests. The suite was working fine. I had IE9 installed on my machine. Then I rolled back that install to IE8 to match our test machines. I can use IE8 just fine on its own. But now, when I try to run my test suite, or any of the individual tests, I get the following error:
Unable to load DLL 'ieframe.dll': Not enough storage is available to process this command. (Exception from HRESULT: 0x80070008) at 3/8/2012 11:04:26 AM
Basically, the browser loads, but then the test fails with this error. It looks like VS is runing out of available memory. I have went through the steps to make the devenv.exe large memory aware, but I still get this error, and occassionally, I'll get a system.outofmemoryexception on the initialization of my test class. I'm now unable to run any of my tests in this suite.
If anyone has seen this before, or has any ideas to try, I would appreciate it.
Thanks.
Todas as Respostas
-
quinta-feira, 8 de março de 2012 19:08
Adding some more info.
It appears that this issue may be related to data-driven tests. I have a testrunner class where I instantiate uimaps and call the test methods. I want all of my tests to be data-driven so that they run iterations against the software for two different years worth of data. I have all my test methods declared with the same [DataSource] attribute to access an excel file that has one column and two rows describing my two years worth of data.
It appears that if I comment out all the [DataSource] attributes on my test methods, the tests run fine in a single iteration. When I add them back in, the error reappears. I had made this change to the suite about the same time as my browser update.
So, are there any best practices for using data sources when you want multiple tests to use the same source file? Should each test have its own datasource? Is it possible that this is the source of my memory issue?
-
segunda-feira, 12 de março de 2012 03:27Moderador
Hi TSAshbrook,
Thank you for posting in the MSDN forum.
Based on your description, if you run the tests without the [DataSource], it works, so I think it is related to your data source, I think there is much more data in it, we can make the multiple tests use the same source file, but I think it is the same step as we use multiple tests use the different source files.
So about this issue, I suggest you can use half of the rows in your data source or few rows to check it. Then use more tests.
Best Regards,
Jack Zhai [MSFT]
MSDN Community Support | Feedback to us
-
quinta-feira, 15 de março de 2012 14:26
There are only two rows in my one column of data. So basically, sheet1 contains the following:
TestYear
2011
2012
Thats it. No other rows, columns, or sheets, so I know it isn't related to the size of my data file.
I've now done so more testing, and I can put the datasource on any two of my tests, and they work fine, but once I add the datasource to any three or more, I get the Unable to load DLL 'ieframe.dll' error for all the tests that I try to run.
To give some insight into the size of project, I have a testrunner class that instances 6 uimaps. The uimaps each contain one or more methods, and the total number of test methods is 9. The test code is about 10,000 lines across the uimaps.
Thanks for any other ideas you can think of to look at.
-
sexta-feira, 16 de março de 2012 05:11Moderador
Hi TSAshbrook,
Glad to receive your reply.
Unable to load DLL 'ieframe.dll': Not enough storage is available to process this command. (Exception from HRESULT: 0x80070008) at 3/8/2012 11:04:26 AM
I think we could check our IE. I’m afraid that it is related to your IE. Do you mean that all tests works with IE8 but not IE9?
I suggest you can record the similar web test and coded UI test with IE9 and run it, check it. In addition, when we use coded UI tests with IE9, it has the condition of constraint. See http://msdn.microsoft.com/en-us/library/dd380742.aspx. Check it, hope it can help.
Best Regards,
Jack Zhai [MSFT]
MSDN Community Support | Feedback to us
-
sexta-feira, 16 de março de 2012 13:46
Thanks.
No, I don't think it is the browser. I'm pretty sure it was coincidence that I had rolled back browsers when I started adding data sources to my project.
The tests all worked in IE 9 in single-run fashion. I had to make a few minor script adjustments, but they all work now in IE8 in single-run fashion. Also, each individual test method in my test runner class can have the DataSource attribute applied and the test will run twice as I expect.
But, this only when works when I have the DataSource commented out for most or all of the other tests. I can get up to two of my methods (any two of them at a time) to run this way, but once the code has three or more DataSource attributes applied to my methods, that is when this error starts to appear. Here is a snippet below from my testrunner class, showing how I have most of the DataSources "turned off/commented out" to get a few running. ExcelDataSource is defined in app.config.
Hope this extra info helps.
[TestMethod]
[Microsoft.VisualStudio.TestTools.UnitTesting.DataSource("ExcelDataSource")]
public void RunAgentTrainingSmokeTest()
{
this.TrainingMap.TestAgentTraining(TestContext, ref TestResults.ResultsString);
}[TestMethod]
//[Microsoft.VisualStudio.TestTools.UnitTesting.DataSource("ExcelDataSource")]
public void RunUserReportsSmokeTest()
{
this.ReportsMap.TestUserReports(TestContext, ref TestResults.ResultsString);
}[TestMethod]
//[Microsoft.VisualStudio.TestTools.UnitTesting.DataSource("ExcelDataSource")]
public void RunCompanyFormsSmokeTest1()
{
this.FormsMap.TestCompanyForms1(TestContext, ref TestResults.ResultsString);
}[TestMethod]
//[Microsoft.VisualStudio.TestTools.UnitTesting.DataSource("ExcelDataSource")]
public void RunCompanyFormsSmokeTest2()
{
this.FormsMap.TestCompanyForms2(TestContext, ref TestResults.ResultsString);
}[TestMethod]
//[Microsoft.VisualStudio.TestTools.UnitTesting.DataSource("ExcelDataSource")]
public void RunCompanyFormsSmokeTest3()
{
this.FormsMap.TestCompanyForms3(TestContext, ref TestResults.ResultsString);
}[TestMethod]
//[Microsoft.VisualStudio.TestTools.UnitTesting.DataSource("ExcelDataSource")]
public void RunEWPSmokeTest()
{
this.EwpMap.EWPSmokeTest(TestContext, ref TestResults.ResultsString);
}[TestMethod]
[Microsoft.VisualStudio.TestTools.UnitTesting.DataSource("ExcelDataSource")]
public void RunPolicySearchSmokeTest()
{
this.PolicyMap.WebPolicySearch(TestContext, ref TestResults.ResultsString);
}[TestMethod]
//[Microsoft.VisualStudio.TestTools.UnitTesting.DataSource("ExcelDataSource")]
public void RunAgentToolsSmokeTest()
{
this.AgentToolsMap.TestAgentTools(TestContext, ref TestResults.ResultsString);
} -
segunda-feira, 19 de março de 2012 11:08Moderador
Hi TSAshbrook,
Sorry for my delay.
Unit Test Adapter threw exception: not enough storage is available to process this command. (Exception from HRESULT: 0x80070008).
I create a unit test with some methods, and then I add the same data source to the methods, I could run it normally.
I did some research about this issue, but I didn't get any better solution, if possible, run it with a better computer configuration, and check it. So we can make sure that whether it is related to memory size,
Or you can share us the project, so we could resolve this issue as soon as possible. You can send it to v-jake at microsoft dot com, I will check it with my computer.
Best Regards,
Jack Zhai [MSFT]
MSDN Community Support | Feedback to us
-
segunda-feira, 19 de março de 2012 15:55
Unfortunately, I don't have access to another machine to test with.
I did, however, run another scenario that seems to point to some sort of memory issue.
I took my testrunner class, and copied it, then put half of the test methods into each copy. I commented out all but two of the datasources in each class. I can get up to two of the test methods in each class to work, simultaneously.
So, all tests run single-iteration from a single class. When I have more than two tests in that class with DataSource, they fail. After splitting them out, I can get two methods in each class to run, or a total of 4. So, it isn't necessarily running out of memory for the whole process, but appears that my testrunner classes 'max out' with more than two running data-driven tests.
In your testing, did you have multiple (or any) UIMaps, or just some bare-bones code to call from the unit tests? It appears that it has to do with instancing multiple UIMaps in data-driven fashion within a single testrunner class.
Thanks for your help.
-
terça-feira, 20 de março de 2012 06:41Moderador
Hi TSAshbrook,
Glad to receive your reply.J
I think you are right, I’m afraid that my project is different from your project. I just create a simple unit test with some method, and then add the same data source. If possible, you could send your project to us, so we can check it by our computer.
Best Regards,
Jack Zhai [MSFT]
MSDN Community Support | Feedback to us
- Editado Jack Zhai - MSFTMicrosoft Contingent Staff, Moderator quarta-feira, 21 de março de 2012 04:53
-
quarta-feira, 21 de março de 2012 05:28Moderador
Hi TSAshbrook,
I have included my project for you to test with. The test method wrappers are in the testrunner.cs. I have three tests currently set up to run as data-driven. Call all three of the tests from the test list editor in run or debug mode. Each test will start, but as soon as the browser loads, the test fails with the unable to load dll error, and starts the next test. I have most of my other code in that class commented out for now to show it isn't affecting how the test runs.
I have received your project, but I meet an issue when I only run a test “RunPolicySearchSmokeTest”, like the following screen shot. It seems that we can’t visit the link: https://www.test1.XXXX/UserLogin/Login.aspx
Whether you have any settings before you run the tests? If so, you could post your detailed steps in a new reply.
In addition, I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
Have a nice day,
Jack Zhai [MSFT]
MSDN Community Support | Feedback to us
-
quarta-feira, 21 de março de 2012 12:44
Hello;
Thanks for the reply.
Yes, you will probably need to switch a value in the app.config file.
You will see the following in app.config
<add key="Environment" value="Test">
<!--<add key="Environment" value="Prod"/>-->
Just change the value from 'Test' to 'Prod'. You should be able to hit the 'Prod' site as it is a public site.
Also, within each test script, there is a declaration for string year. It is set to pull from the config file right now, but there is also a commented line where I try to access the year from the datasource. Just uncomment the line for string year = tc.DataRow["TestYear"].ToString() in each uimap method.
Lastly, the only test you would not be able to run should be the EWPSmokeTest. That test is for a local windows app, not a web site. Let me know if you have more questions. Thanks. -
terça-feira, 27 de março de 2012 18:52
Update:
I have been able to re-factor my testrunner code, and just by moving things around, and cleaning up the code, suddenly, everything started working again. Can't explain it. The code is the same, except that some of my initialization code moved from TestInitialize into ClassInitialize.
I guess this brings this thread to an end without any real answers other than hope for the best when using data-driven tests.

