I was wondering if anybody could help with an issue I have come across, I have recently added to my test framework the sharing of a value using feature content
This has been placed in the [BeforeScenario] trigger
FeatureContext.Current.Add("CreatedUser", createdUser);
I then clean this up in the [AfterScenario] with
FeatureContext.Current.Remove("CreatedUser");
Since adding this I am unable to run more then 1 test, if I run the tests individually (1 by 1) then they execute with no issue.
If I select a few tests to run from visual studio, the first one runs with no issue and the next test will always fail with the following error.
Message: System.Collections.Generic.KeyNotFoundException : The given key was not present in the dictionary.
TearDown : System.NullReferenceException : Object reference not set to an instance of an object.
I added the remove line as i thought the feature context was being carried from test to test and causing an issue but with or without the removal i am getting this error.
Any help is appreciated
I eventually managed to fix this issue by removing the Allure NuGet packages.
I had previously installed
Specflow.Allure
Allure.Commons
This package was causing the issue, I am not sure of the reason but after removing this error stopped occurring.
Related
I have an app that uses graphql and connected to Apollo. Everything works as expected until one day it produces this error (please see image). I follow the solution found in this thread
I enabled the run script for install builds only on my build phase settings. My apps runs again as expected but whenever I try to archive my app, I encountered the error again. I tried to clean my project, reintall pod. delete worxspace and generate again but still encounter the same error. I dont understand why I keep having this error. Please help. Thank you
I have been having an issue with application packages where there will be days/times where I just get a null exit code and BlobAccessDenied Error for the exact same application package and exact same command line that previously worked and gave a non-null exit code. For instance, today, I've been getting this error for the exact same packages and commands that I ran yesterday. What am I missing? Or is this a bug in the application packages service? (for VM configuration)
Update:
This fix is been released and deployed, this error will no longer exist for the specified case.
Also something I wrote in an hour jsut to test and might come handy apart from good dotnet samples :
https://github.com/Tatsinnit/quick_sample_batchapppkgworking
https://github.com/Azure/azure-batch-samples
Thanks j.B. & Jan
I'm currently working on an objective c project where we are trying to now incorporate swift into the project. When I add a Swift unit test to the project I get the following prompt:
I create the bridging header. However, when I try to run my tests I keep getting the following error:
Build operation failed without specifying any errors. Individual build
tasks may have failed for unknown reasons. One possible cause is if
there are too many (possibly zombie) processes; in this case,
rebooting may fix the problem. Some individual build task failures (up
to 12) may be listed below.
I've googled for the error and most people say restart the simulator, xcode, your machine etc. I've done all of this. The problem seems to lie in using swift inside of my unit tests.
Any ideas?
Try moving your project closer to your root directory. Swift compiler can have issues with reaching ARG_MAX in large projects.
https://forums.swift.org/t/swift-compilation-reaching-arg-max-limit-causing-xcode-build-failure/6494
I have wrote a function which technically and logically is correct and while running it runs perfectly locally. But on server I am getting the above error which I could not figure out. I am on protractor version 1.6.0 as same as server but still not able to figure out what causes this.
Scenario is like, I have created many it functions inside my spec.js. But when I ran my spec starting two it functions execute precisely, but on third it scripts fails with above error on server. But when I ran the same spec on my local system with similar settings and configuration, it runs smoothly. Please give me any suggestion if you have encounter the same issue earlier. You can also share the link of a blog if you have any. I am a newbie. Thanks in advance.
Actually , I did a mistake, when we use non angular locators we have to use findElementDriver instead of findElement. Locally, its runs whithout any issues but on server it gives the above error.
My partner and I have a suite of tests running nightly on a build server for our project. We use CruiseControl.NET to run the server, and the tests are written using WatiN and NUnit. We have CruiseControl.NET running as a service with access to interact with the desktop on a local system account. Every few times that we run a build, certain tests will fail with error messages such as the following:
Test: cfarmweb.tests.Views.GeneralRegressionTest.DuplicateUsernameTest
Type: Failure
Message: SetUp : System.Runtime.InteropServices.COMException : Creating an instance of the COM component with CLSID {0002DF01-0000-0000-C000-000000000046} from the IClassFactory failed due to the following error: 800704a6. TearDown : System.NullReferenceException : Object reference not set to an instance of an object.
at WatiN.Core.IE.CreateNewIEAndGoToUri(Uri uri, IDialogHandler logonDialogHandler, Boolean createInNewProcess)
at WatiN.Core.IE..ctor(String url)
at cfarmweb.tests.Navigator.SiteNavigator..ctor(String browserName, Boolean visible) in c:\ccworkdir\CFarm\builddir\cfarmweb.tests\Navigator\SiteNavigator.cs:line 35
at cfarmweb.tests.Views.GeneralRegressionTest.MakeNavigator() in c:\ccworkdir\CFarm\builddir\cfarmweb.tests\Views\GeneralRegressionTest.cs:line 34
--TearDown
at WatiN.Core.Browser.OnGetNativeDocument()
at WatiN.Core.DomContainer.get_NativeDocument()
at WatiN.Core.Document.ContainsText(String text)
at cfarmweb.tests.Navigator.SiteNavigator.HasText(String target) in c:\ccworkdir\CFarm\builddir\cfarmweb.tests\Navigator\SiteNavigator.cs:line 213
at cfarmweb.tests.Navigator.SiteNavigator.SignOut() in c:\ccworkdir\CFarm\builddir\cfarmweb.tests\Navigator\SiteNavigator.cs:line 110
at cfarmweb.tests.Views.GeneralRegressionTest.DisposeNavigator() in c:\ccworkdir\CFarm\builddir\cfarmweb.tests\Views\GeneralRegressionTest.cs:line 123
The success of the builds does not seem to be dependent on changes to the code itself, as we have had builds break or be fixed after changes to parts of the program that are unrelated to the tests.
We are both new to the field of software testing (and development in general), but nothing we've found online about this error seems to pertain to our situation. We've seen everything from a system reboot pending to compatibility issues with Internet Explorer 8 to JavaScript errors, but nothing we've tried has fixed the issues. One of the most difficult parts is that it's not consistently reproducible. How can we fix this problem?
Ben,
I had the exact same issue, surprisingly enough...I think I have the solution. It appears to be a threading issue. The [RequiresSTA] tag at the top of a test is meant to create each test to be single-threaded by implicitly placing the tag [STAThread] on each method. However, I am inclined to believe that these tags are not being called on the [SetUp] or [TearDown] methods, creating threading issues. I have hopefully resolved the issue by placing the [STAThread] tag on each method (including the [SetUp] and [TearDown] methods) explicitly. I will let you know of any further changes, but it's worth a shot.
There are some similar issues related to Watin and IE8.
Running Watin on TeamCity
failed due to the following error: 800704a6 while trying to read data from a text file in teamcity
https://serverfault.com/questions/179156/ie8-script-error-800704a6
From what i understand, make sure you windows is fully updated, make another restart just to make sure and check if problem persist.
If it does, try runnning ccnet not in service mode.
If still no good, try to play with internet options security to determine if this affect the problem.
HTH