ortoni-report 2.0.2 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.md +34 -0
- package/dist/ortoni-report.d.ts +16 -3
- package/dist/ortoni-report.js +856 -661
- package/dist/ortoni-report.mjs +856 -661
- package/dist/style/main.css +89 -0
- package/dist/views/main.hbs +480 -0
- package/dist/views/navbar.hbs +46 -0
- package/dist/views/project.hbs +132 -0
- package/dist/views/summaryCard.hbs +8 -0
- package/dist/views/testPanel.hbs +37 -0
- package/dist/views/testStatus.hbs +33 -0
- package/dist/views/userInfo.hbs +208 -0
- package/package.json +6 -14
- package/readme.md +19 -42
- package/dist/cli/cli.js +0 -49
- package/dist/css/main.css +0 -22444
- package/dist/icon/32.png +0 -0
- package/dist/icon/fail.png +0 -0
- package/dist/icon/file.png +0 -0
- package/dist/icon/flaky.png +0 -0
- package/dist/icon/pass.png +0 -0
- package/dist/icon/retry.png +0 -0
- package/dist/icon/skip.png +0 -0
- package/dist/icon/test.png +0 -0
- package/dist/icon/timeout.png +0 -0
- package/dist/report-template.hbs +0 -823
- package/dist/utils/chart.js +0 -11128
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{{#if (gr statusCount) }}
|
|
2
|
+
<div class="column is-one-sixth">
|
|
3
|
+
<div class="box has-background-{{bg}} filter" data-status="{{status}}">
|
|
4
|
+
<p class="has-text-white is-size-6">{{statusHeader}}</p>
|
|
5
|
+
<p class="has-text-white is-size-4">{{statusCount}}</p>
|
|
6
|
+
</div>
|
|
7
|
+
</div>
|
|
8
|
+
{{/if}}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<div class="columns is-mobile is-vcentered">
|
|
2
|
+
<div class="column">
|
|
3
|
+
<h2 class="title is-4">Tests</h2>
|
|
4
|
+
</div>
|
|
5
|
+
<div class="column">
|
|
6
|
+
<div id="project-filter" class="dropdown is-right is-hoverable is-pulled-right">
|
|
7
|
+
<div class="dropdown-trigger">
|
|
8
|
+
<button class="button" aria-haspopup="true" aria-controls="select-filter">
|
|
9
|
+
<span>Filters</span>
|
|
10
|
+
<span class="icon is-small">
|
|
11
|
+
<i class="fas fa-angle-down" aria-hidden="true"></i>
|
|
12
|
+
</span>
|
|
13
|
+
</button>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="dropdown-menu" id="select-filter" role="menu">
|
|
16
|
+
<div class="dropdown-content">
|
|
17
|
+
{{#each projects}}
|
|
18
|
+
<div class="dropdown-item">
|
|
19
|
+
<label class="checkbox is-capitalized">
|
|
20
|
+
<input name="{{this}}" type="checkbox" data-filter-type="project" value="{{this}}"> {{this}}
|
|
21
|
+
</label>
|
|
22
|
+
</div>
|
|
23
|
+
{{/each}}
|
|
24
|
+
<hr class="dropdown-divider" />
|
|
25
|
+
{{#each allTags}}
|
|
26
|
+
<div class="dropdown-item">
|
|
27
|
+
<label class="checkbox">
|
|
28
|
+
<input name="{{this}}" type="checkbox" data-filter-type="test-tags" value="{{this}}"> {{this}}
|
|
29
|
+
</label>
|
|
30
|
+
</div>
|
|
31
|
+
{{/each}}
|
|
32
|
+
<hr class="dropdown-divider" />
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<div class="icon-text">
|
|
2
|
+
{{#if isRetry}}
|
|
3
|
+
<span class="icon has-text-info">
|
|
4
|
+
<svg class="image is-16x16" id="Layer_1" height="512" viewBox="0 0 512 512" width="512" xmlns="http://www.w3.org/2000/svg" data-name="Layer 1"><circle cx="256" cy="256" fill="#00ab5e" r="256"/><path d="m387.823 256.136c0 72.688-59.135 131.823-131.823 131.823s-131.824-59.135-131.824-131.823a132.14 132.14 0 0 1 77.501-120.136 16 16 0 1 1 13.2 29.15 99.852 99.852 0 1 0 103.749 13.25v25.833a16 16 0 0 1 -32 0v-64.192a16 16 0 0 1 16-16h64.192a16 16 0 0 1 0 32h-25.066a132.143 132.143 0 0 1 46.071 100.095z" fill="#fff"/></svg>
|
|
5
|
+
</span>
|
|
6
|
+
{{else}}
|
|
7
|
+
<span class="icon has-text-info">
|
|
8
|
+
{{#if (eq status "passed")}}
|
|
9
|
+
<svg class="image is-16x16" height="512" viewBox="0 0 520 520" width="512" xmlns="http://www.w3.org/2000/svg">
|
|
10
|
+
<g id="_15-Checked" data-name="15-Checked">
|
|
11
|
+
<circle cx="208.52" cy="288.5" fill="#b0ef8f" r="176.52" />
|
|
12
|
+
<path
|
|
13
|
+
d="m210.516 424.937-2.239-3.815c-34.2-58.27-125.082-181.928-126-183.17l-1.311-1.781 30.963-30.6 98.012 68.439c61.711-80.079 119.283-135.081 156.837-167.2 41.081-35.135 67.822-51.31 68.092-51.465l.608-.364h52.522l-5.017 4.468c-129.029 114.926-268.883 359.19-270.276 361.644z"
|
|
14
|
+
fill="#009045" />
|
|
15
|
+
</g>
|
|
16
|
+
</svg>
|
|
17
|
+
{{/if}}
|
|
18
|
+
{{#if (eq status "failed")}}
|
|
19
|
+
<svg class="image is-16x16" height="512pt" viewBox="0 0 512 512" width="512pt" xmlns="http://www.w3.org/2000/svg"><path d="m256 0c-141.164062 0-256 114.835938-256 256s114.835938 256 256 256 256-114.835938 256-256-114.835938-256-256-256zm0 0" fill="#f44336"/><path d="m350.273438 320.105469c8.339843 8.34375 8.339843 21.824219 0 30.167969-4.160157 4.160156-9.621094 6.25-15.085938 6.25-5.460938 0-10.921875-2.089844-15.082031-6.25l-64.105469-64.109376-64.105469 64.109376c-4.160156 4.160156-9.621093 6.25-15.082031 6.25-5.464844 0-10.925781-2.089844-15.085938-6.25-8.339843-8.34375-8.339843-21.824219 0-30.167969l64.109376-64.105469-64.109376-64.105469c-8.339843-8.34375-8.339843-21.824219 0-30.167969 8.34375-8.339843 21.824219-8.339843 30.167969 0l64.105469 64.109376 64.105469-64.109376c8.34375-8.339843 21.824219-8.339843 30.167969 0 8.339843 8.34375 8.339843 21.824219 0 30.167969l-64.109376 64.105469zm0 0" fill="#fafafa"/></svg>
|
|
20
|
+
{{/if}}
|
|
21
|
+
{{#if (eq status "skipped")}}
|
|
22
|
+
<svg class="image is-16x16" id="Layer_1" enable-background="new 0 0 512 512" height="512" viewBox="0 0 512 512" width="512" xmlns="http://www.w3.org/2000/svg"><g clip-rule="evenodd" fill-rule="evenodd"><path d="m256 0c-141.2 0-256 114.8-256 256s114.8 256 256 256 256-114.8 256-256-114.8-256-256-256z" fill="#fec006"/><path d="m379 244.8c6.3 6.3 6.3 16.4 0 22.7l-112.7 112.5c-3.1 3.1-7.2 4.7-11.3 4.7s-8.2-1.6-11.3-4.7c-6.3-6.3-6.3-16.4 0-22.6l101.3-101.3-101.3-101.3c-6.3-6.3-6.3-16.4 0-22.7s16.4-6.3 22.7 0zm-110.8 22.6-112.5 112.5c-3.1 3.1-7.2 4.7-11.3 4.7s-8.2-1.6-11.3-4.7c-6.2-6.2-6.2-16.4 0-22.6l101.1-101.2-101.2-101.2c-6.2-6.2-6.2-16.4 0-22.6 6.3-6.2 16.4-6.2 22.6 0l112.5 112.5c6.3 6.2 6.3 16.4.1 22.6z" fill="#fff"/></g></svg>
|
|
23
|
+
{{/if}}
|
|
24
|
+
{{#if (eq status "timedOut")}}
|
|
25
|
+
<svg class="image is-16x16" id="Date__x26__Time_-_Flat" enable-background="new 0 0 64 64" height="512" viewBox="0 0 64 64" width="512" xmlns="http://www.w3.org/2000/svg"><g><g><g><path d="m46.12 16.71h-.43c-1.427 0-2.769-.555-3.777-1.562-1.008-1.009-1.563-2.347-1.563-3.769 0-1.842-1.494-3.34-3.33-3.34h-.7c-1.836 0-3.33 1.498-3.33 3.34v3.33c0 .553-.447 1-1 1s-1-.447-1-1v-3.33c0-2.944 2.391-5.34 5.33-5.34h.699c2.939 0 5.33 2.396 5.33 5.34 0 .888.348 1.723.978 2.354.631.63 1.47.977 2.363.977h.43c1.842 0 3.34-1.494 3.34-3.33 0-.553.447-1 1-1s1 .447 1 1c0 2.939-2.396 5.33-5.34 5.33z" fill="#565662"/></g><g><path d="m50.46 8.651c-.553 0-1-.447-1-1v-2.892c0-.553.447-1 1-1s1 .447 1 1v2.893c0 .552-.447.999-1 .999z" fill="#fb7088"/></g><g><path d="m47.824 9.744c-.256 0-.512-.098-.707-.293l-2.046-2.046c-.391-.391-.391-1.023 0-1.414s1.023-.391 1.414 0l2.046 2.046c.391.391.391 1.023 0 1.414-.195.195-.451.293-.707.293z" fill="#fb7088"/></g><g><path d="m55.142 17.062c-.256 0-.512-.098-.707-.293l-2.045-2.045c-.391-.391-.391-1.023 0-1.414s1.023-.391 1.414 0l2.045 2.045c.391.391.391 1.023 0 1.414-.196.195-.452.293-.707.293z" fill="#fb7088"/></g><g><path d="m57.081 12.38h-2.893c-.553 0-1-.447-1-1s.447-1 1-1h2.893c.553 0 1 .447 1 1s-.447 1-1 1z" fill="#fb7088"/></g><g><path d="m53.097 9.744c-.256 0-.512-.098-.707-.293-.391-.391-.391-1.023 0-1.414l2.045-2.046c.391-.391 1.023-.391 1.414 0s.391 1.023 0 1.414l-2.045 2.046c-.196.195-.451.293-.707.293z" fill="#fb7088"/></g><path d="m36.48 18.96v-4.25h-8.96v4.25c-9.04 2.03-15.79 10.11-15.79 19.76 0 11.2 9.08 20.27 20.27 20.27s20.27-9.07 20.27-20.27c0-9.65-6.75-17.73-15.79-19.76z" fill="#565662"/><path d="m32 54.489c-8.694 0-15.767-7.073-15.767-15.767s7.073-15.767 15.767-15.767 15.767 7.073 15.767 15.767c0 8.693-7.073 15.767-15.767 15.767z" fill="#faf8f9"/><path d="m18.233 40.721c0-8.694 7.073-15.767 15.767-15.767 3.839 0 7.359 1.382 10.096 3.671-2.895-3.462-7.241-5.671-12.096-5.671-8.694 0-15.767 7.073-15.767 15.767 0 4.855 2.209 9.201 5.671 12.096-2.289-2.737-3.671-6.257-3.671-10.096z" fill="#e0cad6"/><g><path d="m31.991 26.758c-.553 0-1-.447-1-1v-3.999c0-.553.447-1 1-1s1 .447 1 1v3.999c0 .553-.447 1-1 1z" fill="#565662"/></g><g><path d="m22.827 30.562c-.256 0-.512-.098-.707-.293l-2.828-2.828c-.391-.391-.391-1.023 0-1.414s1.023-.391 1.414 0l2.828 2.828c.391.391.391 1.023 0 1.414-.195.195-.451.293-.707.293z" fill="#565662"/></g><g><path d="m19.036 39.73h-3.998c-.553 0-1-.447-1-1s.447-1 1-1h3.998c.553 0 1 .447 1 1s-.447 1-1 1z" fill="#565662"/></g><g><path d="m20.012 51.722c-.256 0-.512-.098-.707-.293-.391-.391-.391-1.023 0-1.414l2.828-2.827c.391-.391 1.023-.391 1.414 0s.391 1.023 0 1.414l-2.828 2.827c-.196.195-.451.293-.707.293z" fill="#565662"/></g><g><path d="m32.009 56.684c-.553 0-1-.447-1-1v-3.999c0-.553.447-1 1-1s1 .447 1 1v3.999c0 .552-.447 1-1 1z" fill="#565662"/></g><g><path d="m44.001 51.709c-.256 0-.512-.098-.707-.293l-2.828-2.827c-.391-.391-.391-1.023 0-1.414s1.023-.391 1.414 0l2.828 2.827c.391.391.391 1.023 0 1.414-.195.195-.451.293-.707.293z" fill="#565662"/></g><g><path d="m48.962 39.712h-3.998c-.553 0-1-.447-1-1s.447-1 1-1h3.998c.553 0 1 .447 1 1s-.447 1-1 1z" fill="#565662"/></g><g><path d="m41.16 30.549c-.256 0-.512-.098-.707-.293-.391-.391-.391-1.023 0-1.414l2.828-2.828c.391-.391 1.023-.391 1.414 0s.391 1.023 0 1.414l-2.828 2.828c-.195.195-.451.293-.707.293z" fill="#565662"/></g><g><path d="m32 38.228c-.553 0-1-.447-1-1v-7.819c0-.553.447-1 1-1s1 .447 1 1v7.819c0 .552-.447 1-1 1z" fill="#565662"/></g><g><path d="m26.047 45.675c-.256 0-.512-.098-.707-.293-.391-.391-.391-1.024 0-1.414l4.558-4.555c.391-.391 1.023-.391 1.414 0s.391 1.024 0 1.414l-4.558 4.555c-.195.195-.451.293-.707.293z" fill="#565662"/></g><circle cx="32" cy="38.721" fill="#ffc361" r="2.54"/></g></g></svg>
|
|
26
|
+
{{/if}}
|
|
27
|
+
{{#if (eq status "flaky")}}
|
|
28
|
+
<svg class="image is-16x16" height="512" viewBox="0 0 64 64" width="512" xmlns="http://www.w3.org/2000/svg"><g id="Layer_35" data-name="Layer 35"><path d="m32 3.4a28.59 28.59 0 0 0 -28.6 28.6 28.59 28.59 0 0 0 28.6 28.6 28.59 28.59 0 0 0 28.6-28.6 28.59 28.59 0 0 0 -28.6-28.6zm0 49.2a4.32 4.32 0 1 1 4.31-4.31 4.32 4.32 0 0 1 -4.31 4.31zm5.23-35.6-1.63 22a.6.6 0 0 1 -.6.56h-6a.6.6 0 0 1 -.6-.56l-1.63-22a5.24 5.24 0 1 1 10.46 0z" fill="#ffc048"/></g></svg>
|
|
29
|
+
{{/if}}
|
|
30
|
+
</span>
|
|
31
|
+
{{/if}}
|
|
32
|
+
<span>{{title}}</span>
|
|
33
|
+
</div>
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
<header class="has-text-centered title is-4">Suite</header>
|
|
2
|
+
|
|
3
|
+
<div class="columns is-multiline">
|
|
4
|
+
<div class="column is-half">
|
|
5
|
+
<div class="field">
|
|
6
|
+
<label class="label" for="Success Rate">Success Rate</label>
|
|
7
|
+
<p class="is-flex is-align-items-center">
|
|
8
|
+
<span class="icon has-text-success mr-2">
|
|
9
|
+
<i class="fas fa-chart-pie"></i>
|
|
10
|
+
</span>
|
|
11
|
+
<span class="is-size-5 has-text-weight-bold">{{successRate}} %</span>
|
|
12
|
+
</p>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="field">
|
|
15
|
+
<label class="label" for="Last Run">Last Run</label>
|
|
16
|
+
<p class="is-flex is-align-items-center">
|
|
17
|
+
<span class="icon has-text-info mr-2">
|
|
18
|
+
<i class="fas fa-calendar-alt"></i>
|
|
19
|
+
</span>
|
|
20
|
+
<span class="is-size-5">{{lastRunDate}}</span>
|
|
21
|
+
</p>
|
|
22
|
+
</div>
|
|
23
|
+
<div class="field">
|
|
24
|
+
<label class="label" for="Duration">Duration</label>
|
|
25
|
+
<p class="is-flex is-align-items-center">
|
|
26
|
+
<span class="icon has-text-warning mr-2">
|
|
27
|
+
<i class="fas fa-stopwatch"></i>
|
|
28
|
+
</span>
|
|
29
|
+
<span class="is-size-5">{{totalDuration}}</span>
|
|
30
|
+
</p>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
<div class="column is-half">
|
|
34
|
+
<div class="content">
|
|
35
|
+
<div class="content">
|
|
36
|
+
{{#if authorName}}
|
|
37
|
+
<div class="field"></div>
|
|
38
|
+
<label class="label" for="Tester">Tester</label>
|
|
39
|
+
<p class="is-flex is-align-items-center">
|
|
40
|
+
<span class="icon has-text-info mr-2">
|
|
41
|
+
<i class="fas fa-user-tie"></i>
|
|
42
|
+
</span>
|
|
43
|
+
<span class="is-size-5">{{authorName}}</span>
|
|
44
|
+
</p>
|
|
45
|
+
</div>
|
|
46
|
+
{{/if}}
|
|
47
|
+
{{#if testType}}
|
|
48
|
+
<div class="field">
|
|
49
|
+
<label class="label" for="test Type">Test Type</label>
|
|
50
|
+
<p class="is-flex is-align-items-center">
|
|
51
|
+
<span class="icon has-text-primary mr-2">
|
|
52
|
+
<i class="fas fa-code-branch"></i>
|
|
53
|
+
</span>
|
|
54
|
+
<span class="is-size-5">{{testType}}</span>
|
|
55
|
+
</p>
|
|
56
|
+
</div>
|
|
57
|
+
{{/if}}
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
<div class="columns">
|
|
62
|
+
<div class="column is-half">
|
|
63
|
+
<h2 class="is-4 has-text-weight-bold">Summary</h2>
|
|
64
|
+
<hr class="has-background-primary">
|
|
65
|
+
<div class="chart-container">
|
|
66
|
+
<canvas id="testChart"></canvas>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
<div class="column is-half">
|
|
70
|
+
<h2 class="is-4 has-text-weight-bold">Projects</h2>
|
|
71
|
+
<hr class="has-background-primary">
|
|
72
|
+
<div class="chart-container">
|
|
73
|
+
<canvas id="projectChart"></canvas>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
<div class="columns">
|
|
78
|
+
<div class="column">
|
|
79
|
+
<h2 class="is-4 has-text-weight-bold">Each Projects</h2>
|
|
80
|
+
<hr class="has-background-primary">
|
|
81
|
+
<div class="chart-container">
|
|
82
|
+
<canvas id="projectbarChart"></canvas>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
|
86
|
+
<script>
|
|
87
|
+
const overallChart = document.getElementById('testChart');
|
|
88
|
+
new Chart(overallChart, {
|
|
89
|
+
type: "doughnut",
|
|
90
|
+
data: {
|
|
91
|
+
labels: ['Passed', 'Failed', 'Skipped', 'Flaky'],
|
|
92
|
+
datasets: [{
|
|
93
|
+
data: [{{ passCount }}, {{ failCount }}, {{ skipCount }}, {{ flakyCount }}],
|
|
94
|
+
backgroundColor: ['#28a745', '#ff6685', '#66d1ff', '#ffb70f']
|
|
95
|
+
}]
|
|
96
|
+
},
|
|
97
|
+
options: {
|
|
98
|
+
responsive: true,
|
|
99
|
+
maintainAspectRatio: false,
|
|
100
|
+
plugins: {
|
|
101
|
+
legend: {
|
|
102
|
+
position: 'bottom',
|
|
103
|
+
labels: {
|
|
104
|
+
filter: function (legendItem, chartData) {
|
|
105
|
+
const value = chartData.datasets[0].data[legendItem.index];
|
|
106
|
+
return value !== 0;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
tooltip: {
|
|
111
|
+
callbacks: {
|
|
112
|
+
label: function(tooltipItem) {
|
|
113
|
+
const total = tooltipItem.dataset.data.reduce((a, b) => a + b, 0);
|
|
114
|
+
const value = tooltipItem.raw;
|
|
115
|
+
const percentage = ((value / total) * 100).toFixed(2);
|
|
116
|
+
return `${tooltipItem.label}: ${value} tests (${percentage}%)`;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
const projectChart = document.getElementById('projectChart');
|
|
124
|
+
const projectbarChart = document.getElementById('projectbarChart');
|
|
125
|
+
|
|
126
|
+
const projectNames = {{{ json projectNames }}};
|
|
127
|
+
const totalTests = {{{ json totalTests }}};
|
|
128
|
+
function generateRandomColor() {
|
|
129
|
+
const letters = '0123456789ABCDEF';
|
|
130
|
+
let color = '#';
|
|
131
|
+
for (let i = 0; i < 6; i++) {
|
|
132
|
+
color += letters[Math.floor(Math.random() * 16)];
|
|
133
|
+
}
|
|
134
|
+
return color;
|
|
135
|
+
}
|
|
136
|
+
const backgroundColors = totalTests.map(() => generateRandomColor());
|
|
137
|
+
new Chart(projectChart, {
|
|
138
|
+
type: 'doughnut',
|
|
139
|
+
data: {
|
|
140
|
+
labels: projectNames,
|
|
141
|
+
datasets: [{
|
|
142
|
+
data: totalTests,
|
|
143
|
+
backgroundColor: backgroundColors
|
|
144
|
+
}]
|
|
145
|
+
},
|
|
146
|
+
options: {
|
|
147
|
+
responsive: true,
|
|
148
|
+
maintainAspectRatio: false,
|
|
149
|
+
plugins: {
|
|
150
|
+
legend: {
|
|
151
|
+
position: 'bottom'
|
|
152
|
+
},
|
|
153
|
+
tooltip: {
|
|
154
|
+
callbacks: {
|
|
155
|
+
label: function (tooltipItem) {
|
|
156
|
+
return tooltipItem.label + ': ' + tooltipItem.raw + ' tests';
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
const passedTests = {{ json passedTests }};
|
|
164
|
+
const failedTests = {{ json failedTests }};
|
|
165
|
+
const skippedTests = {{ json skippedTests }};
|
|
166
|
+
const retryTests = {{ json retryTests }};
|
|
167
|
+
new Chart(projectbarChart, {
|
|
168
|
+
type: 'bar',
|
|
169
|
+
data: {
|
|
170
|
+
labels: projectNames,
|
|
171
|
+
datasets: [
|
|
172
|
+
{
|
|
173
|
+
label: 'Passed',
|
|
174
|
+
data: passedTests,
|
|
175
|
+
backgroundColor: '#28a745',
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
label: 'Failed',
|
|
179
|
+
data: failedTests,
|
|
180
|
+
backgroundColor: '#ff6685',
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
label: 'Skipped',
|
|
184
|
+
data: skippedTests,
|
|
185
|
+
backgroundColor: '#66d1ff',
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
label: 'Flaky',
|
|
189
|
+
data: retryTests,
|
|
190
|
+
backgroundColor: '#ffb70f',
|
|
191
|
+
}
|
|
192
|
+
]
|
|
193
|
+
},
|
|
194
|
+
options: {
|
|
195
|
+
responsive: true,
|
|
196
|
+
maintainAspectRatio: false,
|
|
197
|
+
scales: {
|
|
198
|
+
x: {
|
|
199
|
+
beginAtZero: true
|
|
200
|
+
},
|
|
201
|
+
y: {
|
|
202
|
+
beginAtZero: true
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
</script>
|
|
208
|
+
</div>
|
package/package.json
CHANGED
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ortoni-report",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "Playwright Report By LetCode with Koushik",
|
|
5
|
-
"bin": {
|
|
6
|
-
"ortoni-report": "./dist/cli/cli.js"
|
|
7
|
-
},
|
|
8
5
|
"scripts": {
|
|
9
|
-
"buildparcel": "parcel build",
|
|
10
6
|
"tsc": "tsc",
|
|
11
|
-
"test": "npx playwright test",
|
|
12
7
|
"build": "tsup",
|
|
13
|
-
"release": "npm publish"
|
|
14
|
-
"lint": "tsc"
|
|
8
|
+
"release": "npm publish"
|
|
15
9
|
},
|
|
16
10
|
"files": [
|
|
17
11
|
"dist",
|
|
@@ -39,14 +33,12 @@
|
|
|
39
33
|
"devDependencies": {
|
|
40
34
|
"@playwright/test": "^1.44.1",
|
|
41
35
|
"@types/node": "^22.0.2",
|
|
42
|
-
"
|
|
43
|
-
"
|
|
36
|
+
"@types/ws": "^8.5.12",
|
|
37
|
+
"ansi-to-html": "^0.7.2",
|
|
44
38
|
"handlebars": "^4.7.8",
|
|
45
39
|
"tsup": "^6.5.0",
|
|
46
|
-
"typescript": "^4.9.4"
|
|
47
|
-
|
|
48
|
-
"dependencies": {
|
|
49
|
-
"parcel": "^2.12.0"
|
|
40
|
+
"typescript": "^4.9.4",
|
|
41
|
+
"ws": "^8.18.0"
|
|
50
42
|
},
|
|
51
43
|
"main": "dist/ortoni-report.js",
|
|
52
44
|
"module": "dist/ortoni-report.mjs",
|
package/readme.md
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Ortoni Report (Unofficial Playwright Report) by Koushik
|
|
1
|
+
# Ortoni Report by Koushik (LetCode with Koushik)
|
|
6
2
|
|
|
7
3
|
Welcome to **Ortoni Report**, a robust HTML report generator tailored for Playwright tests. Ortoni Report introduces powerful features to enhance test reporting, making it easier to visualize and manage test results.
|
|
8
4
|
|
|
9
|
-
|
|
5
|
+
Experience the live report: [Ortoni Report](https://ortoni.netlify.app/)
|
|
10
6
|
|
|
11
|
-

|
|
12
8
|
|
|
13
9
|
## Key Features
|
|
14
10
|
|
|
@@ -49,7 +45,7 @@ Explore the live demo: [OrtoniReport Demo](https://ortoni.netlify.app/)
|
|
|
49
45
|
- Add a relative or absolute path of the image to the config.
|
|
50
46
|
|
|
51
47
|
11. **Share Report**
|
|
52
|
-
-
|
|
48
|
+
- Once report is generated it is ready to share
|
|
53
49
|
|
|
54
50
|
12. **Advanced Filtering**
|
|
55
51
|
- Filter tests by project, tags, and status simultaneously, with the ability to display only those tests matching the selected criteria.
|
|
@@ -73,37 +69,25 @@ Explore the live demo: [OrtoniReport Demo](https://ortoni.netlify.app/)
|
|
|
73
69
|
npm install -g ortoni-report
|
|
74
70
|
```
|
|
75
71
|
|
|
76
|
-
#### Generate and Bundle HTML Report
|
|
77
|
-
|
|
78
|
-
2. **Generate and bundle the report**:
|
|
79
|
-
|
|
80
|
-
```sh
|
|
81
|
-
npx ortoni-report gr -f ortoni-report.html
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
### Command Overview
|
|
85
|
-
|
|
86
|
-
- `npx ortoni-report gr -f <filename>`: Bundle the specified report file.
|
|
87
|
-
- `-f, --filename <filename>`: Specify the filename for the generated report (default: `ortoni-report.html`).
|
|
88
|
-
|
|
89
72
|
### Configurable Report Generation
|
|
90
73
|
|
|
91
74
|
Configure OrtoniReport in your `playwright.config.ts`:
|
|
92
75
|
|
|
93
76
|
```typescript
|
|
94
77
|
import { defineConfig } from '@playwright/test';
|
|
95
|
-
import { OrtoniReportConfig } from
|
|
78
|
+
import { OrtoniReportConfig } from "ortoni-report";
|
|
96
79
|
|
|
97
80
|
const reportConfig: OrtoniReportConfig = {
|
|
98
|
-
base64Image: true,
|
|
99
|
-
logo: "logo.png",
|
|
100
|
-
title: "Playwight Sample Project",
|
|
101
|
-
showProject: true,
|
|
102
|
-
filename: "result",
|
|
103
|
-
authorName: "LetCode Koushik",
|
|
104
81
|
preferredTheme: "light",
|
|
105
|
-
|
|
106
|
-
|
|
82
|
+
filename: "index",
|
|
83
|
+
authorName: "Koushik (LetCode with Koushik)",
|
|
84
|
+
projectName: "Ortoni Report V2.0.3",
|
|
85
|
+
testType: "Release",
|
|
86
|
+
title: "Ortoni Report By LetCode Koushik",
|
|
87
|
+
logo: "logo.png",
|
|
88
|
+
base64Image: true,
|
|
89
|
+
folderPath: "report",
|
|
90
|
+
showProject: false
|
|
107
91
|
}
|
|
108
92
|
|
|
109
93
|
export default defineConfig({
|
|
@@ -111,22 +95,11 @@ export default defineConfig({
|
|
|
111
95
|
// Other Playwright configurations
|
|
112
96
|
});
|
|
113
97
|
```
|
|
114
|
-
|
|
115
|
-
### Common Issue
|
|
116
|
-
|
|
117
|
-
```
|
|
118
|
-
Error: Command failed:
|
|
119
|
-
@parcel/namer-default: Target "main" declares an
|
|
120
|
-
output file path of "index.js" which does not match
|
|
121
|
-
the compiled bundle type "html".
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
**Solution**: Remove `"main"` in the `package.json` file.
|
|
125
|
-
|
|
126
98
|
### Comprehensive Test Details
|
|
127
99
|
|
|
128
100
|
- **Rich Test Information**: Each test includes details like title, status, duration, tags, errors, steps, logs, video, and screenshot.
|
|
129
101
|
- **Color-coded Status**: Status indicators (green for passed, red for failed, yellow for skipped) for quick identification.
|
|
102
|
+
- **Static HTML Report**: Single file can be shared easily
|
|
130
103
|
|
|
131
104
|
### Future Plans
|
|
132
105
|
|
|
@@ -147,6 +120,10 @@ We value your feedback and contributions! For issues, suggestions, or contributi
|
|
|
147
120
|
|
|
148
121
|
Thank you for choosing Ortoni Report. We're committed to enhancing your Playwright testing experience.
|
|
149
122
|
|
|
123
|
+
### Support
|
|
124
|
+
UPI: ortoni@axl (Koushik Chatterjee)
|
|
125
|
+
|
|
126
|
+
|
|
150
127
|
---
|
|
151
128
|
|
|
152
129
|
**LetCode with Koushik**
|
package/dist/cli/cli.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
-
};
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
const fs_1 = __importDefault(require("fs"));
|
|
8
|
-
const path_1 = __importDefault(require("path"));
|
|
9
|
-
const commander_1 = require("commander");
|
|
10
|
-
const child_process_1 = require("child_process");
|
|
11
|
-
const utils_1 = require("../utils/utils");
|
|
12
|
-
const findParcelBinary = () => {
|
|
13
|
-
const localParcel = path_1.default.resolve(__dirname, '../../node_modules/.bin/parcel');
|
|
14
|
-
const projectParcel = path_1.default.resolve(process.cwd(), 'node_modules/.bin/parcel');
|
|
15
|
-
return fs_1.default.existsSync(localParcel) ? localParcel : projectParcel;
|
|
16
|
-
};
|
|
17
|
-
commander_1.program
|
|
18
|
-
.name('ortoni-report')
|
|
19
|
-
.description('Ortoni Report by LetCode with Koushik')
|
|
20
|
-
.version('1.0.0');
|
|
21
|
-
commander_1.program
|
|
22
|
-
.command('gr')
|
|
23
|
-
.description('Bundle Ortoni Report')
|
|
24
|
-
.option('-f, --filename <filename>', 'Specify the filename for the generated report', 'ortoni-report.html')
|
|
25
|
-
.action((options) => {
|
|
26
|
-
const filename = (0, utils_1.ensureHtmlExtension)(options.filename);
|
|
27
|
-
const reportPath = path_1.default.resolve(process.cwd(), filename);
|
|
28
|
-
if (!fs_1.default.existsSync(reportPath)) {
|
|
29
|
-
console.error(`${filename} not found. Please ensure the report has been generated.`);
|
|
30
|
-
process.exit(1);
|
|
31
|
-
}
|
|
32
|
-
// Resolve the path to the local parcel binary
|
|
33
|
-
const parcelPath = findParcelBinary();
|
|
34
|
-
const parcelCommand = `${parcelPath} build ${reportPath} --dist-dir ortoni-report --public-url ./`;
|
|
35
|
-
console.log('Bundling Ortoni Report...');
|
|
36
|
-
(0, child_process_1.exec)(parcelCommand, (error, stdout, stderr) => {
|
|
37
|
-
if (error) {
|
|
38
|
-
console.error(`Error: ${error.message}`);
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
if (stderr) {
|
|
42
|
-
console.error(`stderr: ${stderr}`);
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
console.log(`stdout: ${stdout}`);
|
|
46
|
-
console.log('Report bundled successfully.');
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
commander_1.program.parse(process.argv);
|