addproject
This commit is contained in:
60
zhyy/test_case/reports/allure-report/app.js
Normal file
60
zhyy/test_case/reports/allure-report/app.js
Normal file
File diff suppressed because one or more lines are too long
4
zhyy/test_case/reports/allure-report/data/behaviors.csv
Normal file
4
zhyy/test_case/reports/allure-report/data/behaviors.csv
Normal file
@@ -0,0 +1,4 @@
|
||||
"Epic","Feature","Story","FAILED","BROKEN","PASSED","SKIPPED","UNKNOWN"
|
||||
"","深圳采购工作台首页","验证采购工作台待办任务与在办任务功能","0","0","2","0","0"
|
||||
"","深圳采购工作台采购订单页面","验证采购工作台采购订单页面列表查询","0","0","2","0","0"
|
||||
"","","","0","0","1","0","0"
|
||||
|
6
zhyy/test_case/reports/allure-report/data/suites.csv
Normal file
6
zhyy/test_case/reports/allure-report/data/suites.csv
Normal file
@@ -0,0 +1,6 @@
|
||||
"Status","Start Time","Stop Time","Duration in ms","Parent Suite","Suite","Sub Suite","Test Class","Test Method","Name","Description"
|
||||
"passed","Thu Jan 22 17:45:22 CST 2026","Thu Jan 22 17:45:24 CST 2026","2362","zhyy.test_case.TestCase.接口.SZPurchase","index","Test_purchase_index","","","test_check_todo",""
|
||||
"passed","Thu Jan 22 18:16:40 CST 2026","Thu Jan 22 18:16:41 CST 2026","528","zhyy.test_case.TestCase.接口.SZPurchase","PurchaseOrderManage","Test_purchase_order","","","test_check_purchase_order_page",""
|
||||
"passed","Thu Jan 22 16:47:07 CST 2026","Thu Jan 22 16:47:07 CST 2026","0","zhyy.test_case.TestCase","test_sample","","","","test_sample",""
|
||||
"passed","Thu Jan 22 18:16:38 CST 2026","Thu Jan 22 18:16:40 CST 2026","2656","zhyy.test_case.TestCase.接口.SZPurchase","index","Test_purchase_index","","","test_check_todo",""
|
||||
"passed","Thu Jan 22 17:45:24 CST 2026","Thu Jan 22 17:45:25 CST 2026","530","zhyy.test_case.TestCase.接口.SZPurchase","PurchaseOrderManage","Test_purchase_order","","","test_check_purchase_order_page",""
|
||||
|
1
zhyy/test_case/reports/allure-report/favicon.ico
Normal file
1
zhyy/test_case/reports/allure-report/favicon.ico
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = __webpack_public_path__ + "favicon.ico";
|
||||
150
zhyy/test_case/reports/allure-report/plugins/behaviors/index.js
Normal file
150
zhyy/test_case/reports/allure-report/plugins/behaviors/index.js
Normal file
@@ -0,0 +1,150 @@
|
||||
'use strict';
|
||||
|
||||
allure.api.addTranslation('en', {
|
||||
tab: {
|
||||
behaviors: {
|
||||
name: 'Behaviors'
|
||||
}
|
||||
},
|
||||
widget: {
|
||||
behaviors: {
|
||||
name: 'Features by stories',
|
||||
showAll: 'show all'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
allure.api.addTranslation('ru', {
|
||||
tab: {
|
||||
behaviors: {
|
||||
name: 'Функциональность'
|
||||
}
|
||||
},
|
||||
widget: {
|
||||
behaviors: {
|
||||
name: 'Функциональность',
|
||||
showAll: 'показать все'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
allure.api.addTranslation('zh', {
|
||||
tab: {
|
||||
behaviors: {
|
||||
name: '功能'
|
||||
}
|
||||
},
|
||||
widget: {
|
||||
behaviors: {
|
||||
name: '特性场景',
|
||||
showAll: '显示所有'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
allure.api.addTranslation('de', {
|
||||
tab: {
|
||||
behaviors: {
|
||||
name: 'Verhalten'
|
||||
}
|
||||
},
|
||||
widget: {
|
||||
behaviors: {
|
||||
name: 'Features nach Stories',
|
||||
showAll: 'Zeige alle'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
allure.api.addTranslation('he', {
|
||||
tab: {
|
||||
behaviors: {
|
||||
name: 'התנהגויות'
|
||||
}
|
||||
},
|
||||
widget: {
|
||||
behaviors: {
|
||||
name: 'תכונות לפי סיפורי משתמש',
|
||||
showAll: 'הצג הכול'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
allure.api.addTranslation('br', {
|
||||
tab: {
|
||||
behaviors: {
|
||||
name: 'Comportamentos'
|
||||
}
|
||||
},
|
||||
widget: {
|
||||
behaviors: {
|
||||
name: 'Funcionalidades por história',
|
||||
showAll: 'Mostrar tudo'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
allure.api.addTranslation('ja', {
|
||||
tab: {
|
||||
behaviors: {
|
||||
name: '振る舞い'
|
||||
}
|
||||
},
|
||||
widget: {
|
||||
behaviors: {
|
||||
name: 'ストーリー別の機能',
|
||||
showAll: '全て表示'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
allure.api.addTranslation('es', {
|
||||
tab: {
|
||||
behaviors: {
|
||||
name: 'Funcionalidades'
|
||||
}
|
||||
},
|
||||
widget: {
|
||||
behaviors: {
|
||||
name: 'Funcionalidades por Historias de Usuario',
|
||||
showAll: 'mostrar todo'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
allure.api.addTranslation('kr', {
|
||||
tab: {
|
||||
behaviors: {
|
||||
name: '동작'
|
||||
}
|
||||
},
|
||||
widget: {
|
||||
behaviors: {
|
||||
name: '스토리별 기능',
|
||||
showAll: '전체 보기'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
allure.api.addTab('behaviors', {
|
||||
title: 'tab.behaviors.name', icon: 'fa fa-list',
|
||||
route: 'behaviors(/)(:testGroup)(/)(:testResult)(/)(:testResultTab)(/)',
|
||||
onEnter: (function (testGroup, testResult, testResultTab) {
|
||||
return new allure.components.TreeLayout({
|
||||
testGroup: testGroup,
|
||||
testResult: testResult,
|
||||
testResultTab: testResultTab,
|
||||
tabName: 'tab.behaviors.name',
|
||||
baseUrl: 'behaviors',
|
||||
url: 'data/behaviors.json',
|
||||
csvUrl: 'data/behaviors.csv'
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
allure.api.addWidget('widgets', 'behaviors', allure.components.WidgetStatusView.extend({
|
||||
rowTag: 'a',
|
||||
title: 'widget.behaviors.name',
|
||||
baseUrl: 'behaviors',
|
||||
showLinks: true
|
||||
}));
|
||||
@@ -0,0 +1,88 @@
|
||||
'use strict';
|
||||
|
||||
allure.api.addTranslation('en', {
|
||||
tab: {
|
||||
packages: {
|
||||
name: 'Packages'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
allure.api.addTranslation('ru', {
|
||||
tab: {
|
||||
packages: {
|
||||
name: 'Пакеты'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
allure.api.addTranslation('zh', {
|
||||
tab: {
|
||||
packages: {
|
||||
name: '包'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
allure.api.addTranslation('de', {
|
||||
tab: {
|
||||
packages: {
|
||||
name: 'Pakete'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
allure.api.addTranslation('he', {
|
||||
tab: {
|
||||
packages: {
|
||||
name: 'חבילות'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
allure.api.addTranslation('br', {
|
||||
tab: {
|
||||
packages: {
|
||||
name: 'Pacotes'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
allure.api.addTranslation('ja', {
|
||||
tab: {
|
||||
packages: {
|
||||
name: 'パッケージ'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
allure.api.addTranslation('es', {
|
||||
tab: {
|
||||
packages: {
|
||||
name: 'Paquetes'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
allure.api.addTranslation('kr', {
|
||||
tab: {
|
||||
packages: {
|
||||
name: '패키지'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
allure.api.addTab('packages', {
|
||||
title: 'tab.packages.name', icon: 'fa fa-align-left',
|
||||
route: 'packages(/)(:testGroup)(/)(:testResult)(/)(:testResultTab)(/)',
|
||||
onEnter: (function (testGroup, testResult, testResultTab) {
|
||||
return new allure.components.TreeLayout({
|
||||
testGroup: testGroup,
|
||||
testResult: testResult,
|
||||
testResultTab: testResultTab,
|
||||
tabName: 'tab.packages.name',
|
||||
baseUrl: 'packages',
|
||||
url: 'data/packages.json'
|
||||
});
|
||||
})
|
||||
});
|
||||
@@ -0,0 +1,97 @@
|
||||
(function () {
|
||||
var settings = allure.getPluginSettings('screen-diff', {diffType: 'diff'});
|
||||
|
||||
function renderImage(src) {
|
||||
return '<div class="screen-diff__container">' +
|
||||
'<img class="screen-diff__image" src="data/attachments/' + src + '">' +
|
||||
'</div>';
|
||||
}
|
||||
|
||||
function renderDiffContent(type, data) {
|
||||
function findImage(name) {
|
||||
if (data.testStage && data.testStage.attachments) {
|
||||
return data.testStage.attachments.filter(function (attachment) {
|
||||
return attachment.name === name;
|
||||
})[0];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
var diffImage = findImage('diff');
|
||||
var actualImage = findImage('actual');
|
||||
var expectedImage = findImage('expected');
|
||||
|
||||
if (!diffImage && !actualImage && !expectedImage) {
|
||||
return '<span>Diff, actual and expected image have not been provided.</span>';
|
||||
}
|
||||
|
||||
if (type === 'diff') {
|
||||
if (!diffImage) {
|
||||
return renderImage(actualImage.source);
|
||||
}
|
||||
return renderImage(diffImage.source);
|
||||
}
|
||||
if (type === 'overlay') {
|
||||
return '<div class="screen-diff__overlay screen-diff__container">' +
|
||||
'<img class="screen-diff__image" src="data/attachments/' + expectedImage.source + '">' +
|
||||
'<div class="screen-diff__image-over">' +
|
||||
'<img class="screen-diff__image" src="data/attachments/' + actualImage.source + '">' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
}
|
||||
}
|
||||
|
||||
var ScreenDiffView = Backbone.Marionette.View.extend({
|
||||
className: 'pane__section',
|
||||
events: {
|
||||
'click [name="screen-diff-type"]': 'onDiffTypeChange',
|
||||
'mousemove .screen-diff__overlay': 'onOverlayMove'
|
||||
},
|
||||
templateContext: function () {
|
||||
return {
|
||||
diffType: settings.get('diffType')
|
||||
}
|
||||
},
|
||||
template: function (data) {
|
||||
var testType = data.labels.filter(function (label) {
|
||||
return label.name === 'testType'
|
||||
})[0];
|
||||
|
||||
if (!testType || testType.value !== 'screenshotDiff') {
|
||||
return '';
|
||||
}
|
||||
|
||||
return '<h3 class="pane__section-title">Screen Diff</h3>' +
|
||||
'<div class="screen-diff__content">' +
|
||||
'<div class="screen-diff__switchers">' +
|
||||
'<label><input type="radio" name="screen-diff-type" value="diff"> Show diff</label>' +
|
||||
'<label><input type="radio" name="screen-diff-type" value="overlay"> Show overlay</label>' +
|
||||
'</div>' +
|
||||
renderDiffContent(data.diffType, data) +
|
||||
'</div>';
|
||||
},
|
||||
adjustImageSize: function (event) {
|
||||
var overImage = this.$(event.target);
|
||||
overImage.width(overImage.width());
|
||||
},
|
||||
onRender: function () {
|
||||
const diffType = settings.get('diffType');
|
||||
this.$('[name="screen-diff-type"][value="' + diffType + '"]').prop('checked', true);
|
||||
if (diffType === 'overlay') {
|
||||
this.$('.screen-diff__image-over img').on('load', this.adjustImageSize.bind(this));
|
||||
}
|
||||
},
|
||||
onOverlayMove: function (event) {
|
||||
var pageX = event.pageX;
|
||||
var containerScroll = this.$('.screen-diff__container').scrollLeft();
|
||||
var elementX = event.currentTarget.getBoundingClientRect().left;
|
||||
var delta = pageX - elementX + containerScroll;
|
||||
this.$('.screen-diff__image-over').width(delta);
|
||||
},
|
||||
onDiffTypeChange: function (event) {
|
||||
settings.save('diffType', event.target.value);
|
||||
this.render();
|
||||
}
|
||||
});
|
||||
allure.api.addTestResultBlock(ScreenDiffView, {position: 'before'});
|
||||
})();
|
||||
@@ -0,0 +1,26 @@
|
||||
.screen-diff__switchers {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.screen-diff__switchers label + label {
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
.screen-diff__overlay {
|
||||
position: relative;
|
||||
cursor: col-resize;
|
||||
}
|
||||
|
||||
.screen-diff__container {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.screen-diff__image-over {
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
background: #fff;
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
box-shadow: 2px 0 1px -1px #aaa;
|
||||
}
|
||||
6
zhyy/test_case/reports/allure-report/styles.css
Normal file
6
zhyy/test_case/reports/allure-report/styles.css
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user