Пример #1
0
        void DisplayFunctionalitySupport(List <TestInfo> tests)
        {
            List <Feature> features = new List <Feature>(_td.Features);

            features.AddRange(_td.UndefinedFeatures);
            ProfilesSupportInfo info = ProfilesSupportInfo.LoadPreliminary(_onvifProfiles, _testInfos, tests, features);

            View.DisplayFunctionalityWithoutTestsInSuite(info.FunctionalityWithoutTests);
            View.DisplayFunctionalityToBeTested(info.FunctionalityUnderTests);
            View.DisplayFailedByFeaturesFunctionality(info.MandatoryFunctionalityWithoutFeatures);
            View.DisplaySkippedByFeaturesFunctionality(info.OptionalFunctionalityUnderSkippedTests);

            DisplayProfileScopes();
        }
Пример #2
0
        void CompleteTestSuite(TestSuiteParameters parameters, bool bCompletedNormally)
        {
            if (bCompletedNormally)
            {
                if (parameters.DefineProfiles)
                {
                    Dictionary <TestInfo, TestStatus> results =
                        new Dictionary <TestInfo, TestStatus>();
                    foreach (TestInfo info in _testResults.Keys)
                    {
                        results.Add(info, _testResults[info].Log.TestStatus);
                    }

                    if (View.ProfilesView != null)
                    {
                        Dictionary <Functionality, bool> functionalities = ProfilesSupportInfo.CheckTestResults(results);
                        View.ProfilesView.DisplaySupportedFunctionality(functionalities);
                    }

                    bool failed = _testResults.Values.Where(TR => TR.Log.TestStatus == TestStatus.Failed).Count() > 0;
                    //

                    List <IProfileDefinition> failedProfiles    = new List <IProfileDefinition>();
                    List <IProfileDefinition> supportedProfiles = new List <IProfileDefinition>();

                    if (_initializationData.FailedProfiles.Count != 0 && !failed)
                    {
                        failedProfiles.AddRange(_initializationData.FailedProfiles);
                    }
                    else if (failed)
                    {
                        failedProfiles.AddRange(_initializationData.FailedProfiles);
                        failedProfiles.AddRange(_initializationData.SupportedProfiles);
                    }
                    else
                    {
                        supportedProfiles.AddRange(_initializationData.SupportedProfiles);
                    }

                    if (View.ProfilesView != null)
                    {
                        View.ProfilesView.DisplayProfiles(supportedProfiles, failedProfiles,
                                                          _initializationData.UnsupportedProfiles);
                    }
                }

                UpdateTestLog();
            }
        }
        /// <summary>
        /// Displays at the profiles tree functionality
        ///   - to be tested;
        ///   - mandatory without features support
        ///   - optional without fetures support
        ///   - without tests in suite
        /// </summary>
        /// <param name="tests"></param>
        void DisplayFunctionalitySupport(IEnumerable <TestInfo> tests)
        {
            if (View.ProfilesView != null)
            {
                List <Feature> features = new List <Feature>(_td.Features);
                features.AddRange(_td.UndefinedFeatures);

                var parameters = new Dictionary <string, object>();
                parameters.Add("MaxPullPoints", _td.MaxPullPoints);

                ProfilesSupportInfo info = ProfilesSupportInfo.LoadPreliminary(_onvifProfiles, _testInfos, tests, features, parameters);

                View.ProfilesView.DisplayFunctionalityWithoutTestsInSuite(info.FunctionalityWithoutTests);
                View.ProfilesView.DisplayFunctionalityToBeTested(info.FunctionalityUnderTests);
                View.ProfilesView.DisplayMandatoryFunctionalityWithoutFeatures(info.MandatoryFunctionalityWithoutFeatures);
                View.ProfilesView.DisplayOptionalFunctionalityWithoutFeatures(info.OptionalFunctionalityUnderSkippedTests);

                DisplayProfileScopes();
                DisplayDiscoveryTypes();
            }
        }