alielie
2026-09-10 9ec80cafc23f5ee3278cacce3c9f86f4087b435a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
using OpenTap.Addin.Listener;
using System;
using System.IO;
 
namespace OpenTap.Addin.Util
{
    public abstract class ReportListener : RootListener
    {
 
        public ReportListener(string name)
        {
            this.name = name;
        }
 
        public override abstract IResultListener CreateChild();
 
        protected abstract void PlanStarted();
        protected abstract void StepComplated(TestStepRun stepRun);
        protected abstract void PlanComplated();
 
        public override void Close()
        {
            base.Close();
            ResultSettings.Current.Remove(this);
        }
 
        public override void OnTestPlanRunCompleted(TestPlanRun planRun, Stream logStream)
        {
            lock (this)
            {
                if (Root != null)
                {
                    Root.OnTestPlanRunCompleted(planRun, logStream);
                }
                else
                {
                    if (planRun == RootPlanRun)
                    {
                        PlanComplated();
                    }
                }
            }
        }
 
        public override void OnTestPlanRunStart(TestPlanRun planRun)
        {
            lock (this)
            {
                base.OnTestPlanRunStart(planRun);
                if (planRun == RootPlanRun)
                {
                    PlanStarted();
                }
            }
        }
 
        public override void OnTestStepRunCompleted(TestStepRun stepRun)
        {
            lock (this)
            {
                if (Root != null)
                {
                    Root.OnTestStepRunCompleted(stepRun);
                }
                else
                {
                    StepComplated(stepRun);
                }
            }
        }
 
        public override void OnTestStepRunStart(TestStepRun stepRun)
        {
        }
 
        public override void Open()
        {
            base.Open();
        }
 
        public override void OnResultPublished(Guid stepRunID, ResultTable result)
        {
 
        }
    }
}