예제 #1
0
 public static bool IsAllOrNullProfile(TestProfileType type)
 {
     if (
         (type == TestProfileType.AllTrackpointsProfile) ||
         (type == TestProfileType.NullProfile)
         )
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
예제 #2
0
        public static void ValidateTracking(ExpectedTrace expectedTrace, ActualTrace actualTrace, TrackingProfile profile, TestProfileType profileType, TrackingParticipantType participantType)
        {
            //1. Filter the expected trace against the workFlow profile
            ExpectedTrace filteredExpectedTrace = TrackingFilter.ApplyTrackingProfile(expectedTrace, profile);

            ////2. Delete not supported trace steps by testObjects.
            ActualTrace modifiedActualTrace = TrackingFilter.DeleteNotSupportedTraceSteps(actualTrace);

            TestTraceManager.OptionalLogTrace("[TestTrackingDataManager]*****ValidateTracking()");
            ////3. Validate the expected & the actual trace
            TestTraceManager.OptionalLogTrace("[TestTrackingDataManager]Profile = {0}", profile);
            TestTraceManager.OptionalLogTrace("[TestTrackingDataManager]Actual Trace = {0}", actualTrace);
            TestTraceManager.OptionalLogTrace("[TestTrackingDataManager]Expected Trace = {0}", expectedTrace);
            TestTraceManager.OptionalLogTrace("[TestTrackingDataManager]Filtered Expected Trace (after applying tracking profile) = {0}", filteredExpectedTrace);
            TestTraceManager.OptionalLogTrace("[TestTrackingDataManager]Modified ActualTrace Trace = {0}", modifiedActualTrace);
            TestTraceManager.OptionalLogTrace("[TestTrackingDataManager]Invoking internally the trace validation...");

            ////if (!(TestProfileProvider.IsAllOrNullProfile(profileType) &&
            if (((participantType != TrackingParticipantType.SqlTrackingParticipant) &&
                 (participantType != TrackingParticipantType.ETWTrackingParticipant)))
            {
                modifiedActualTrace.Validate(filteredExpectedTrace, TestTraceManager.IsDefaultTrackingConfiguration);
            }

            //Log.TraceInternal("[TestTrackingDataManager]*****Validate method Succeeded...");
        }