This project is read-only.
1
Vote

'ddlEnvironment' has a SelectedValue which is invalid because it does not exist in the list of items. Parameter name: value

description

Setup at least two projects.

For one project define a release, sprint, environment, group.
For the other project ensure that the above settings do not exist.

On the dashboard select a project, then release, sprint, environment, group etc. Filtering works as expected.

Now change the project filter and you will see:
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentOutOfRangeException: 'ddlEnvironment' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value

Source Error:


Line 214: if (HttpContext.Current.Session["CurrentEnvironment"] != null)
Line 215: {
Line 216: ddlEnvironment.SelectedValue = HttpContext.Current.Session["CurrentEnvironment"].ToString();
Line 217: }
Line 218: else

Source File: c:\Development\Crystal Test\Projects\CTWebsite\Default.aspx.cs Line: 216

Stack Trace:


[ArgumentOutOfRangeException: 'ddlEnvironment' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value]
System.Web.UI.WebControls.ListControl.set_SelectedValue(String value) +9843752
CTWebsite._Default.ddlProjectsValueChange() in c:\Development\Crystal Test\Projects\CTWebsite\Default.aspx.cs:216
CTWebsite._Default.ddlProject_SelectedIndexChanged(Object sender, EventArgs e) in c:\Development\Crystal Test\Projects\CTWebsite\Default.aspx.cs:147
System.Web.UI.WebControls.ListControl.OnSelectedIndexChanged(EventArgs e) +116
System.Web.UI.WebControls.DropDownList.RaisePostDataChangedEvent() +133
System.Web.UI.WebControls.DropDownList.System.Web.UI.IPostBackDataHandler.RaisePostDataChangedEvent() +13
System.Web.UI.Page.RaiseChangedEvents() +132
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1644

comments

Beugnen wrote Mar 5, 2015 at 12:14 AM

Once this error has occurred I have to restart my browser - Chrome

Beugnen wrote Mar 6, 2015 at 4:45 AM

I think it might be because some of the other filters are still active which might not be relevant for the other project?

Thanks Jacqueline

jacquelinewalton wrote Mar 9, 2015 at 4:10 AM

The issue here has nothing to do with the number of projects created nor switching back and forth. The issue is that the Test Cases page also shows test results. Test Results require an environment. If there are no environments for the project, then this page will blow up on load. I need to add code to catch this issue and display a message to the user and redirect users to the Admin Environments page. I have this on the plate for next weekend. For now, just make sure you have at least one environment setup for all of your projects. You also will not be able to enter any results if no environment is setup.

Environment = the environment in which the test is ran such as Dev, QA, UAT, Production, etc.

Note: The test case page will show the same test cases despite the value of the environment drop down. This only changes the displayed results.

jacquelinewalton wrote Mar 9, 2015 at 4:17 AM

Additional Note: The environment base URL and admin URL is used in the Selenium automation framework to let the test know which page to start on. It has a field for base and admin in case your admin section of yur site is at a sub domain or different URL

wrote Nov 28 at 5:31 AM