├── allure-java-adaptor-api └── src │ ├── test │ ├── resources │ │ ├── a.txt │ │ ├── a.html │ │ ├── a.xml │ │ ├── a.jpeg │ │ ├── a.png │ │ ├── testdata │ │ │ └── META-INF │ │ │ │ └── services │ │ │ │ └── ru.yandex.qatools.allure.experimental.LifecycleListener │ │ └── a.json │ └── java │ │ └── ru │ │ └── yandex │ │ └── qatools │ │ └── allure │ │ ├── experimental │ │ ├── testdata │ │ │ └── FailingListener.java │ │ └── ListenersNotifierSPITest.java │ │ ├── ChangeTestCaseTitleEvent.java │ │ ├── storages │ │ ├── TestCaseStorageTest.java │ │ └── TestSuiteStorageTest.java │ │ ├── ChangeTestSuiteTitleEvent.java │ │ └── utils │ │ └── testdata │ │ └── SimpleClass.java │ └── main │ ├── java │ └── ru │ │ └── yandex │ │ └── qatools │ │ └── allure │ │ ├── events │ │ ├── StepEvent.java │ │ ├── TestCaseEvent.java │ │ ├── TestSuiteEvent.java │ │ ├── Event.java │ │ ├── StepFinishedEvent.java │ │ ├── TestCaseFinishedEvent.java │ │ ├── StepCanceledEvent.java │ │ ├── TestSuiteFinishedEvent.java │ │ ├── StepFailureEvent.java │ │ └── StepStartedEvent.java │ │ ├── storages │ │ └── TestCaseStorage.java │ │ └── exceptions │ │ └── AllureException.java │ └── resources │ └── bindings.xjb ├── allure-report-face ├── .istanbul.yml ├── .gitignore ├── src │ ├── helpers │ │ ├── eq.js │ │ ├── gt.js │ │ ├── inc.js │ │ ├── concat.js │ │ ├── filesize.js │ │ ├── fileicon.js │ │ ├── b.js │ │ ├── t.js │ │ ├── default.js │ │ ├── sort-class.js │ │ ├── linky.js │ │ ├── time.js │ │ ├── date.js │ │ └── status-bar.js │ ├── favicon.ico │ ├── layouts │ │ ├── application │ │ │ ├── AppLayout.hbs │ │ │ ├── styles.css │ │ │ └── AppLayout.js │ │ ├── error │ │ │ └── ErrorLayout.js │ │ ├── overview │ │ │ └── OverivewLayout.js │ │ └── pane │ │ │ └── PaneLayout.js │ ├── plugins │ │ ├── testcase-links │ │ │ ├── styles.css │ │ │ ├── index.js │ │ │ ├── LinksView.hbs │ │ │ └── LinksView.js │ │ ├── behaviors │ │ │ ├── behavior-view │ │ │ │ ├── BehaviorView.hbs │ │ │ │ └── BehaviorView.js │ │ │ ├── BehaviorsWidget.js │ │ │ ├── index.js │ │ │ ├── data │ │ │ │ └── BehaviorsModel.js │ │ │ └── behaviors-tree │ │ │ │ └── styles.css │ │ ├── xunit │ │ │ ├── testsuite-view │ │ │ │ ├── TestsuiteView.hbs │ │ │ │ └── TestsuiteView.js │ │ │ ├── XUnitWidget.js │ │ │ ├── index.js │ │ │ ├── testsuites-list │ │ │ │ ├── styles.css │ │ │ │ └── suite-table-row.hbs │ │ │ └── xunit-collection │ │ │ │ └── XUnitCollection.js │ │ ├── testcase-parameters │ │ │ ├── styles.css │ │ │ ├── index.js │ │ │ ├── ParametersView.hbs │ │ │ └── ParametersView.js │ │ ├── report-stats │ │ │ ├── report-stats-widget │ │ │ │ ├── ReportWidgetModel.js │ │ │ │ ├── styles.css │ │ │ │ ├── ReportStatsWidget.js │ │ │ │ └── ReportStatsWidget.hbs │ │ │ └── index.js │ │ ├── testcase-description │ │ │ ├── index.js │ │ │ ├── DescriptionView.hbs │ │ │ └── DescriptionView.js │ │ ├── environment │ │ │ ├── index.js │ │ │ └── environment-widget │ │ │ │ ├── EnvironmentWidget.hbs │ │ │ │ └── EnvironmentWidget.js │ │ ├── defects │ │ │ ├── defects-widget │ │ │ │ ├── DefectsWidget.js │ │ │ │ └── DefectsWidget.hbs │ │ │ ├── translations │ │ │ │ ├── zh.json │ │ │ │ ├── en.json │ │ │ │ ├── ptbr.json │ │ │ │ └── ru.json │ │ │ ├── defect-view │ │ │ │ ├── DefectView.hbs │ │ │ │ └── DefectView.js │ │ │ ├── defects-list │ │ │ │ ├── styles.css │ │ │ │ ├── DefectsListView.js │ │ │ │ └── DefectsListView.hbs │ │ │ ├── defects-collection │ │ │ │ └── DefectsCollection.js │ │ │ └── index.js │ │ ├── graph │ │ │ ├── GraphCollection.js │ │ │ ├── index.js │ │ │ ├── GraphLayout.js │ │ │ ├── graph-widget │ │ │ │ ├── GraphWidget.js │ │ │ │ └── GraphWidget.hbs │ │ │ └── styles.css │ │ ├── timeline │ │ │ ├── styles.css │ │ │ ├── index.js │ │ │ ├── TimelineModel.js │ │ │ └── TimelineLayout.js │ │ └── default │ │ │ └── index.js │ ├── components │ │ ├── error-splash │ │ │ ├── ErrorSplashView.hbs │ │ │ └── ErrorSplashView.js │ │ ├── side-nav │ │ │ ├── allure-logo.png │ │ │ └── SideNavView.hbs │ │ ├── language-select │ │ │ ├── checkmark.svg │ │ │ ├── LanguageSelectView.hbs │ │ │ ├── styles.css │ │ │ └── LanguageSelectView.js │ │ ├── testcase-view │ │ │ └── styles.css │ │ ├── status-toggle │ │ │ ├── StatusToggleView.hbs │ │ │ ├── styles.css │ │ │ └── StatusToggleView.js │ │ ├── popover │ │ │ ├── PopoverView.js │ │ │ └── styles.css │ │ ├── widgets-grid │ │ │ └── styles.css │ │ ├── testcase-table │ │ │ ├── styles.css │ │ │ └── TestcaseTableView.hbs │ │ ├── widget-status │ │ │ ├── WidgetStatusView.js │ │ │ └── WidgetStatusView.hbs │ │ ├── steps │ │ │ ├── arrow.svg │ │ │ ├── StepsView.hbs │ │ │ ├── styles.css │ │ │ └── steps-list.hbs │ │ ├── tooltip │ │ │ └── styles.css │ │ ├── attachment │ │ │ └── styles.css │ │ └── chart │ │ │ └── styles.css │ ├── behaviors │ │ ├── index.js │ │ ├── LoadBehavior.js │ │ └── TooltipBehavior.js │ ├── util │ │ ├── settings.js │ │ ├── escape.js │ │ ├── highlight.js │ │ ├── sorting.js │ │ ├── translation.js │ │ └── TestcasePanes.js │ ├── blocks │ │ ├── table │ │ │ ├── sortable-col.hbs │ │ │ ├── sort-icon.svg │ │ │ ├── sort-down-icon.svg │ │ │ └── sort-up-icon.svg │ │ ├── island │ │ │ └── styles.css │ │ ├── link │ │ │ └── styles.css │ │ ├── splash │ │ │ └── styles.css │ │ ├── label │ │ │ └── styles.css │ │ ├── text │ │ │ └── styles.css │ │ ├── attachment-row │ │ │ ├── attachment-row.hbs │ │ │ └── styles.css │ │ ├── bar │ │ │ └── styles.css │ │ ├── pane-header │ │ │ └── pane-header.hbs │ │ ├── alert │ │ │ └── styles.css │ │ ├── spinner │ │ │ └── styles.css │ │ └── widget │ │ │ └── styles.css │ ├── data │ │ ├── widgets │ │ │ └── WidgetsModel.js │ │ ├── testcase │ │ │ └── TestcaseModel.js │ │ └── settings │ │ │ └── SettingsModel.js │ ├── grid.css │ ├── mixins.css │ ├── index.js │ ├── decorators │ │ └── index.js │ ├── pluginApi.js │ ├── router.spec.js │ ├── router.js │ └── variables.css ├── .babelrc ├── test │ ├── .eslintrc │ ├── app.spec.js │ ├── bootstrap.js │ └── components │ │ └── status-toggle.spec.js ├── jasmine.json ├── .eslintrc └── tools │ └── serve.js ├── allure-report-data └── src │ ├── test │ ├── resources │ │ ├── ru │ │ │ └── yandex │ │ │ │ └── qatools │ │ │ │ └── allure │ │ │ │ └── data │ │ │ │ └── testdata │ │ │ │ └── SomePluginWithResources │ │ │ │ ├── b.xml │ │ │ │ └── a.txt │ │ ├── testdata1 │ │ │ └── META-INF │ │ │ │ └── services │ │ │ │ └── ru.yandex.qatools.allure.data.testdata.SomeService │ │ ├── testdata2 │ │ │ └── META-INF │ │ │ │ └── services │ │ │ │ └── ru.yandex.qatools.allure.data.testdata.SomeService │ │ ├── testdata3 │ │ │ └── META-INF │ │ │ │ └── services │ │ │ │ └── ru.yandex.qatools.allure.data.testdata.SomeService │ │ ├── testdata │ │ │ └── META-INF │ │ │ │ └── services │ │ │ │ └── ru.yandex.qatools.allure.data.plugins.Plugin │ │ └── testresults │ │ │ └── invalidxmlcharacters-testsuite.xml │ ├── groovy │ │ └── ru │ │ │ └── yandex │ │ │ └── qatools │ │ │ └── allure │ │ │ └── data │ │ │ ├── testdata │ │ │ ├── SomeService.groovy │ │ │ ├── SomeServiceImpl.groovy │ │ │ ├── SomePlugin.groovy │ │ │ ├── SomePreparePlugin.groovy │ │ │ ├── SomePluginWithResources.groovy │ │ │ └── SomeProcessPlugin.groovy │ │ │ ├── plugins │ │ │ ├── DefaultPluginLoaderTest.groovy │ │ │ ├── MigrationPluginTest.groovy │ │ │ ├── GraphPluginTest.groovy │ │ │ └── PluginsIndexTest.groovy │ │ │ └── utils │ │ │ └── PluginUtilsTest.groovy │ └── java │ │ └── ru │ │ └── yandex │ │ └── qatools │ │ └── allure │ │ └── data │ │ └── PluginResourcesTest.java │ └── main │ ├── java │ └── ru │ │ └── yandex │ │ └── qatools │ │ └── allure │ │ └── data │ │ ├── converters │ │ ├── TestCaseConverter.java │ │ └── TestSuiteConverter.java │ │ ├── io │ │ └── AttachmentReader.java │ │ └── ReportGenerationException.java │ ├── groovy │ └── ru │ │ └── yandex │ │ └── qatools │ │ └── allure │ │ └── data │ │ ├── utils │ │ └── SummaryCategory.groovy │ │ └── plugins │ │ ├── PluginStorage.groovy │ │ ├── GraphPlugin.groovy │ │ ├── TotalPlugin.groovy │ │ ├── MigrationPlugin.groovy │ │ └── EnvironmentPlugin.groovy │ └── resources │ ├── META-INF │ └── services │ │ └── ru.yandex.qatools.allure.data.plugins.Plugin │ ├── index.html.ftl │ └── xsd │ ├── graph-plugin.xsd │ ├── total-plugin.xsd │ ├── bindings.xjb │ └── report-data.xsd ├── allure-model └── src │ ├── test │ ├── resources │ │ └── allure-results │ │ │ ├── 234a7a37-5559-4294-8da6-84b193cee507-attachment.txt │ │ │ ├── 650cb877-49cc-446d-964f-f6aa1e5d9634-attachment.txt │ │ │ ├── 8bc0e8b2-b9f3-4d94-ae5e-99540156e65e-attachment.xml │ │ │ ├── 10790969-f137-4a63-84e0-f900cb0dd79c-attachment.png │ │ │ ├── 2a61ec3c-1149-47cc-8640-615e51af26f5-attachment.png │ │ │ ├── 42eff8b6-ac66-48b3-94db-64f64cb40d88-attachment.png │ │ │ ├── 8e86c8ae-c2cd-49d4-a1b8-87592aa6de02-attachment.png │ │ │ ├── aae99fa5-af39-461f-b218-b1e4f2a88e56-attachment.webm │ │ │ ├── dc160fcc-5f8e-4682-b186-93a65cbd24da-attachment.png │ │ │ ├── 00a0bc5a-6372-4e66-8088-1571966a156b-attachment.tar.gz │ │ │ ├── 00a0bc5a-6372-4e66-8088-1571966a056b-attachment.uri │ │ │ ├── b81da3c0-1b9d-4219-9e35-87e139ec446c-attachment.csv │ │ │ └── d3df6bc4-475d-436b-b99f-3a4eaba6d1a7-testsuite.xml │ └── java │ │ └── ru │ │ └── yandex │ │ └── qatools │ │ └── allure │ │ └── config │ │ ├── VersionTest.java │ │ └── AllureNamingUtilsTest.java │ └── main │ └── resources │ └── environment.xsd ├── .mvn └── wrapper │ ├── maven-wrapper.jar │ └── maven-wrapper.properties ├── allure-commandline └── src │ ├── it │ ├── version │ │ └── verify.groovy │ ├── generate │ │ └── results │ │ │ └── sample-testsuite.xml │ ├── generate-from-path │ │ └── results │ │ │ └── sample-testsuite.xml │ └── generate with space in path │ │ └── results directory │ │ └── sample-testsuite.xml │ └── main │ ├── plugins │ └── README.txt │ ├── resources │ └── jetty-logging.properties │ ├── conf │ ├── command.properties │ └── log4j.properties │ └── java │ └── ru │ └── yandex │ └── qatools │ └── allure │ ├── command │ ├── AllureCommand.java │ ├── AllureHelp.java │ ├── ExitCode.java │ ├── AllureCommandException.java │ ├── AllureVersion.java │ ├── ReportClean.java │ └── ReportCommand.java │ ├── CommandProperties.java │ └── utils │ └── DeleteVisitor.java ├── allure-testng-adaptor └── src │ ├── main │ └── resources │ │ └── META-INF │ │ └── services │ │ └── org.testng.ITestNGListener │ └── test │ ├── java │ └── ru │ │ └── yandex │ │ └── qatools │ │ └── allure │ │ └── testng │ │ ├── testdata │ │ ├── SimpleTestngTest.java │ │ ├── GroupTest.java │ │ └── TestDataClass.java │ │ └── AllureTestUtils.java │ └── resources │ ├── suite1.xml │ ├── suite2.xml │ ├── suite-groups.xml │ └── suite3.xml ├── allure-junit-adaptor └── src │ ├── main │ └── resources │ │ └── META-INF │ │ └── services │ │ └── org.junit.runner.notification.RunListener │ └── test │ └── java │ └── ru │ └── yandex │ └── qatools │ └── allure │ └── junit │ ├── testdata │ ├── TestData.java │ ├── ClassWithIgnoreAnnotatedMethod.java │ ├── TestClassWithExceptionInBefore.java │ ├── TestWithTimeoutAnnotation.java │ ├── SimpleTestClass.java │ └── TestWithTimeoutRule.java │ └── BasicListenerTest.java ├── .gitignore ├── AUTHORS ├── allure-report-plugin-api ├── src │ └── main │ │ ├── java │ │ └── ru │ │ │ └── yandex │ │ │ └── qatools │ │ │ └── allure │ │ │ └── data │ │ │ ├── plugins │ │ │ ├── WithPriority.java │ │ │ ├── PreparePlugin.java │ │ │ ├── PluginLoader.java │ │ │ ├── WithData.java │ │ │ ├── ProcessPlugin.java │ │ │ ├── PluginData.java │ │ │ ├── DefaultTabPlugin.java │ │ │ ├── PluginClassLoader.java │ │ │ ├── WithResources.java │ │ │ ├── WithWidget.java │ │ │ └── AttachmentsIndex.java │ │ │ ├── io │ │ │ ├── Reader.java │ │ │ └── ResultDirectories.java │ │ │ └── Widgets.java │ │ └── resources │ │ └── xsd │ │ ├── widgets.xsd │ │ └── testcases.xjb └── pom.xml ├── .github ├── CONTRIBUTING.md └── PULL_REQUEST_TEMPLATE.md ├── allure-java-annotations ├── src │ └── main │ │ └── java │ │ └── ru │ │ └── yandex │ │ └── qatools │ │ └── allure │ │ └── annotations │ │ ├── TestCaseId.java │ │ ├── Title.java │ │ ├── Issue.java │ │ ├── Severity.java │ │ ├── Issues.java │ │ ├── Step.java │ │ ├── Features.java │ │ ├── Description.java │ │ ├── Stories.java │ │ ├── Attachment.java │ │ └── Parameter.java └── pom.xml ├── allure-commons └── src │ ├── test │ └── java │ │ └── ru │ │ └── yandex │ │ └── qatools │ │ └── allure │ │ └── commons │ │ └── BadXmlCharacterFilterReaderTest.java │ └── main │ └── java │ └── ru │ └── yandex │ └── qatools │ └── allure │ └── commons │ └── BadXmlCharacterFilterReader.java └── allure-java-aspects └── src └── test └── java └── ru └── yandex └── qatools └── allure └── aspects └── testdata └── MySteps.java /allure-java-adaptor-api/src/test/resources/a.txt: -------------------------------------------------------------------------------- 1 | simple text attachment -------------------------------------------------------------------------------- /allure-report-face/.istanbul.yml: -------------------------------------------------------------------------------- 1 | instrumentation: 2 | root: src 3 | 4 | -------------------------------------------------------------------------------- /allure-java-adaptor-api/src/test/resources/a.html: -------------------------------------------------------------------------------- 1 | 2 | html -------------------------------------------------------------------------------- /allure-report-face/.gitignore: -------------------------------------------------------------------------------- 1 | coverage 2 | etc 3 | node_modules 4 | node 5 | target 6 | -------------------------------------------------------------------------------- /allure-java-adaptor-api/src/test/resources/a.xml: -------------------------------------------------------------------------------- 1 | 2 | Simple xml -------------------------------------------------------------------------------- /allure-report-face/src/helpers/eq.js: -------------------------------------------------------------------------------- 1 | export default function(a, b) { 2 | return a === b; 3 | } 4 | -------------------------------------------------------------------------------- /allure-report-face/src/helpers/gt.js: -------------------------------------------------------------------------------- 1 | export default function(a, b) { 2 | return a > b; 3 | } 4 | -------------------------------------------------------------------------------- /allure-report-face/src/helpers/inc.js: -------------------------------------------------------------------------------- 1 | export default function(index) { 2 | return index + 1; 3 | } 4 | -------------------------------------------------------------------------------- /allure-report-data/src/test/resources/ru/yandex/qatools/allure/data/testdata/SomePluginWithResources/b.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /allure-report-face/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "optional": ["runtime", "es7.decorators", "es7.classProperties"] 3 | } 4 | -------------------------------------------------------------------------------- /allure-model/src/test/resources/allure-results/234a7a37-5559-4294-8da6-84b193cee507-attachment.txt: -------------------------------------------------------------------------------- 1 | I kinda like a log -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allure-framework/allure1/HEAD/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /allure-report-face/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allure-framework/allure1/HEAD/allure-report-face/src/favicon.ico -------------------------------------------------------------------------------- /allure-commandline/src/it/version/verify.groovy: -------------------------------------------------------------------------------- 1 | def log = new File(basedir as File, "command.log") 2 | assert log.text.trim() != 'null' -------------------------------------------------------------------------------- /allure-commandline/src/main/plugins/README.txt: -------------------------------------------------------------------------------- 1 | The directory with Allure plugins. To add the plugin simply add plugin jar to this folder. -------------------------------------------------------------------------------- /allure-report-data/src/test/resources/testdata1/META-INF/services/ru.yandex.qatools.allure.data.testdata.SomeService: -------------------------------------------------------------------------------- 1 | bad services file 2 | -------------------------------------------------------------------------------- /allure-report-face/src/helpers/concat.js: -------------------------------------------------------------------------------- 1 | export default function concat(...args) { 2 | return args.slice(0, -1).join(''); 3 | } 4 | -------------------------------------------------------------------------------- /allure-testng-adaptor/src/main/resources/META-INF/services/org.testng.ITestNGListener: -------------------------------------------------------------------------------- 1 | ru.yandex.qatools.allure.testng.AllureTestListener -------------------------------------------------------------------------------- /allure-report-data/src/test/resources/ru/yandex/qatools/allure/data/testdata/SomePluginWithResources/a.txt: -------------------------------------------------------------------------------- 1 | some tab plugin static resources! -------------------------------------------------------------------------------- /allure-report-face/test/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "jasmine": true 4 | }, 5 | "globals": { 6 | "dump": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.0/apache-maven-3.5.0-bin.zip -------------------------------------------------------------------------------- /allure-junit-adaptor/src/main/resources/META-INF/services/org.junit.runner.notification.RunListener: -------------------------------------------------------------------------------- 1 | ru.yandex.qatools.allure.junit.AllureRunListener -------------------------------------------------------------------------------- /allure-report-face/src/layouts/application/AppLayout.hbs: -------------------------------------------------------------------------------- 1 |
2 |
3 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/testcase-links/styles.css: -------------------------------------------------------------------------------- 1 | .testcase-link { 2 | &:not(:last-child):after { 3 | content: ','; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /allure-model/src/test/resources/allure-results/650cb877-49cc-446d-964f-f6aa1e5d9634-attachment.txt: -------------------------------------------------------------------------------- 1 | {"success": true, "data": {"name": "", "value": 0}} -------------------------------------------------------------------------------- /allure-java-adaptor-api/src/test/resources/a.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allure-framework/allure1/HEAD/allure-java-adaptor-api/src/test/resources/a.jpeg -------------------------------------------------------------------------------- /allure-java-adaptor-api/src/test/resources/a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allure-framework/allure1/HEAD/allure-java-adaptor-api/src/test/resources/a.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | #IDEA Files 2 | .idea 3 | target 4 | *.iml 5 | *.ipr 6 | 7 | #Eclipse files 8 | *.settings 9 | *.classpath 10 | *.project 11 | *.pydevproject -------------------------------------------------------------------------------- /allure-report-face/jasmine.json: -------------------------------------------------------------------------------- 1 | { 2 | "spec_dir": "./test", 3 | "spec_files": [ 4 | "**/*.spec.js" 5 | ], 6 | "helpers": ["bootstrap.js"] 7 | } 8 | -------------------------------------------------------------------------------- /allure-commandline/src/main/resources/jetty-logging.properties: -------------------------------------------------------------------------------- 1 | org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.LoggerLog 2 | org.eclipse.jetty.LEVEL=WARN -------------------------------------------------------------------------------- /allure-report-face/src/components/error-splash/ErrorSplashView.hbs: -------------------------------------------------------------------------------- 1 |

{{code}}

2 |

{{message}}

3 | -------------------------------------------------------------------------------- /allure-report-data/src/test/resources/testdata2/META-INF/services/ru.yandex.qatools.allure.data.testdata.SomeService: -------------------------------------------------------------------------------- 1 | ru.yandex.qatools.allure.data.testdata.SomePlugin 2 | -------------------------------------------------------------------------------- /allure-report-data/src/test/resources/testdata3/META-INF/services/ru.yandex.qatools.allure.data.testdata.SomeService: -------------------------------------------------------------------------------- 1 | ru.yandex.qatools.allure.data.testdata.SomeServiceImpl 2 | -------------------------------------------------------------------------------- /allure-report-face/src/components/side-nav/allure-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allure-framework/allure1/HEAD/allure-report-face/src/components/side-nav/allure-logo.png -------------------------------------------------------------------------------- /allure-report-face/src/helpers/filesize.js: -------------------------------------------------------------------------------- 1 | import filesize from 'filesize'; 2 | 3 | export default function(size) { 4 | return filesize(size, {base: 2, round: 1}); 5 | } 6 | -------------------------------------------------------------------------------- /allure-model/src/test/resources/allure-results/8bc0e8b2-b9f3-4d94-ae5e-99540156e65e-attachment.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /allure-report-face/src/helpers/fileicon.js: -------------------------------------------------------------------------------- 1 | import typeByMime from '../util/attachmentType'; 2 | 3 | export default function(type) { 4 | return typeByMime(type).icon; 5 | } 6 | -------------------------------------------------------------------------------- /allure-report-face/src/helpers/b.js: -------------------------------------------------------------------------------- 1 | import b from 'b_'; 2 | 3 | export default function (...args) { 4 | const options = args.pop(); 5 | return b(...args, options.hash); 6 | } 7 | -------------------------------------------------------------------------------- /allure-report-face/src/behaviors/index.js: -------------------------------------------------------------------------------- 1 | import LoadBehavior from './LoadBehavior'; 2 | import TooltipBehavior from './TooltipBehavior'; 3 | 4 | export {LoadBehavior, TooltipBehavior}; 5 | -------------------------------------------------------------------------------- /allure-report-face/src/helpers/t.js: -------------------------------------------------------------------------------- 1 | import i18next from '../util/translation'; 2 | 3 | export default function translate(key, options) { 4 | return i18next.t(key, options.hash); 5 | } 6 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/behaviors/behavior-view/BehaviorView.hbs: -------------------------------------------------------------------------------- 1 | {{> ../../../blocks/pane-header/pane-header baseUrl=baseUrl title=title uid=uid}} 2 | 3 |
4 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/xunit/testsuite-view/TestsuiteView.hbs: -------------------------------------------------------------------------------- 1 | {{> ../../../blocks/pane-header/pane-header baseUrl=baseUrl uid=uid title=title}} 2 | 3 |
4 | -------------------------------------------------------------------------------- /allure-report-face/src/util/settings.js: -------------------------------------------------------------------------------- 1 | import SettingsModel from '../data/settings/SettingsModel'; 2 | 3 | const settings = new SettingsModel(); 4 | settings.fetch(); 5 | 6 | export default settings; 7 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/testcase-links/index.js: -------------------------------------------------------------------------------- 1 | import allurePlugins from '../../pluginApi'; 2 | 3 | import LinksView from './LinksView'; 4 | allurePlugins.addTestcaseBlock(LinksView, {position: 'before'}); 5 | -------------------------------------------------------------------------------- /allure-report-face/test/app.spec.js: -------------------------------------------------------------------------------- 1 | import App from 'app'; 2 | 3 | describe('app', function() { 4 | it('should instantiate application', function() { 5 | expect(App).toBeDefined(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /allure-report-face/src/blocks/table/sortable-col.hbs: -------------------------------------------------------------------------------- 1 |
3 | {{title}} 4 |
5 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/testcase-parameters/styles.css: -------------------------------------------------------------------------------- 1 | @import "../../variables.css"; 2 | 3 | .testcase-environment { 4 | margin-bottom: 0.5em; 5 | &__key { 6 | color: $text-muted-color; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /allure-report-face/src/helpers/default.js: -------------------------------------------------------------------------------- 1 | export default function (...values) { 2 | values.pop(); 3 | for(let value of values) { 4 | if(value) { 5 | return value; 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /allure-report-face/src/helpers/sort-class.js: -------------------------------------------------------------------------------- 1 | export default function(sortField, {field, order}) { 2 | if(field === sortField) { 3 | return order === 'asc' ? 'up' : 'down'; 4 | } 5 | return false; 6 | } 7 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/report-stats/report-stats-widget/ReportWidgetModel.js: -------------------------------------------------------------------------------- 1 | import {Model} from 'backbone'; 2 | 3 | export default class ReportWidgetModel extends Model { 4 | url = 'data/report.json'; 5 | } 6 | -------------------------------------------------------------------------------- /allure-report-face/src/blocks/island/styles.css: -------------------------------------------------------------------------------- 1 | @import "../../variables.css"; 2 | 3 | .island { 4 | background: $content-bg; 5 | border: 1px solid $border-accent-color; 6 | padding: $gap-size $gap-size 0 $gap-size; 7 | } 8 | -------------------------------------------------------------------------------- /allure-report-face/src/components/language-select/checkmark.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/testcase-parameters/index.js: -------------------------------------------------------------------------------- 1 | import allurePlugins from '../../pluginApi'; 2 | 3 | import ParametersView from './ParametersView'; 4 | allurePlugins.addTestcaseBlock(ParametersView, {position: 'before'}); 5 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/testcase-description/index.js: -------------------------------------------------------------------------------- 1 | import allurePlugins from '../../pluginApi'; 2 | 3 | import DescriptionView from './DescriptionView'; 4 | allurePlugins.addTestcaseBlock(DescriptionView, {position: 'before'}); 5 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/environment/index.js: -------------------------------------------------------------------------------- 1 | import allurePlugins from '../../pluginApi'; 2 | import EnvironmentWidget from './environment-widget/EnvironmentWidget'; 3 | 4 | allurePlugins.addWidget('environment', EnvironmentWidget); 5 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/report-stats/index.js: -------------------------------------------------------------------------------- 1 | import allurePlugins from '../../pluginApi'; 2 | import ReportStatsWidget from './report-stats-widget/ReportStatsWidget'; 3 | 4 | allurePlugins.addWidget('report-stats', ReportStatsWidget); 5 | -------------------------------------------------------------------------------- /allure-java-adaptor-api/src/test/resources/testdata/META-INF/services/ru.yandex.qatools.allure.experimental.LifecycleListener: -------------------------------------------------------------------------------- 1 | ru.yandex.qatools.allure.experimental.testdata.SimpleListener 2 | ru.yandex.qatools.allure.experimental.testdata.FailingListener -------------------------------------------------------------------------------- /allure-model/src/test/resources/allure-results/10790969-f137-4a63-84e0-f900cb0dd79c-attachment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allure-framework/allure1/HEAD/allure-model/src/test/resources/allure-results/10790969-f137-4a63-84e0-f900cb0dd79c-attachment.png -------------------------------------------------------------------------------- /allure-model/src/test/resources/allure-results/2a61ec3c-1149-47cc-8640-615e51af26f5-attachment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allure-framework/allure1/HEAD/allure-model/src/test/resources/allure-results/2a61ec3c-1149-47cc-8640-615e51af26f5-attachment.png -------------------------------------------------------------------------------- /allure-model/src/test/resources/allure-results/42eff8b6-ac66-48b3-94db-64f64cb40d88-attachment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allure-framework/allure1/HEAD/allure-model/src/test/resources/allure-results/42eff8b6-ac66-48b3-94db-64f64cb40d88-attachment.png -------------------------------------------------------------------------------- /allure-model/src/test/resources/allure-results/8e86c8ae-c2cd-49d4-a1b8-87592aa6de02-attachment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allure-framework/allure1/HEAD/allure-model/src/test/resources/allure-results/8e86c8ae-c2cd-49d4-a1b8-87592aa6de02-attachment.png -------------------------------------------------------------------------------- /allure-model/src/test/resources/allure-results/aae99fa5-af39-461f-b218-b1e4f2a88e56-attachment.webm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allure-framework/allure1/HEAD/allure-model/src/test/resources/allure-results/aae99fa5-af39-461f-b218-b1e4f2a88e56-attachment.webm -------------------------------------------------------------------------------- /allure-model/src/test/resources/allure-results/dc160fcc-5f8e-4682-b186-93a65cbd24da-attachment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allure-framework/allure1/HEAD/allure-model/src/test/resources/allure-results/dc160fcc-5f8e-4682-b186-93a65cbd24da-attachment.png -------------------------------------------------------------------------------- /allure-report-face/src/util/escape.js: -------------------------------------------------------------------------------- 1 | import {escapeExpression} from 'handlebars/runtime'; 2 | 3 | export default function escape(source, ...tokens) { 4 | return source.reduce((result, s, i) => result + escapeExpression(tokens[i - 1]) + s); 5 | } 6 | -------------------------------------------------------------------------------- /allure-model/src/test/resources/allure-results/00a0bc5a-6372-4e66-8088-1571966a156b-attachment.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allure-framework/allure1/HEAD/allure-model/src/test/resources/allure-results/00a0bc5a-6372-4e66-8088-1571966a156b-attachment.tar.gz -------------------------------------------------------------------------------- /allure-report-face/src/blocks/table/sort-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /allure-model/src/test/resources/allure-results/00a0bc5a-6372-4e66-8088-1571966a056b-attachment.uri: -------------------------------------------------------------------------------- 1 | # Link to image 2 | data/8e86c8ae-c2cd-49d4-a1b8-87592aa6de02-attachment.png 3 | 4 | # Other link 5 | data/aae99fa5-af39-461f-b218-b1e4f2a88e56-attachment.webm 6 | -------------------------------------------------------------------------------- /allure-report-face/src/blocks/link/styles.css: -------------------------------------------------------------------------------- 1 | @import "../../variables.css"; 2 | 3 | .link { 4 | color: $link-color; 5 | transition: color 0.15s ease-out; 6 | text-decoration: none; 7 | &:hover { 8 | color: $link-color-hover; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/defects/defects-widget/DefectsWidget.js: -------------------------------------------------------------------------------- 1 | import {ItemView} from 'backbone.marionette'; 2 | import template from './DefectsWidget.hbs'; 3 | 4 | export default class DefectsWidget extends ItemView { 5 | template = template; 6 | } 7 | -------------------------------------------------------------------------------- /allure-junit-adaptor/src/test/java/ru/yandex/qatools/allure/junit/testdata/TestData.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.junit.testdata; 2 | 3 | /** 4 | * @author Dmitry Baev charlie@yandex-team.ru 5 | * Date: 16.01.14 6 | */ 7 | public class TestData { 8 | } 9 | -------------------------------------------------------------------------------- /allure-report-face/src/blocks/table/sort-down-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /allure-report-face/src/blocks/table/sort-up-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /allure-model/src/test/resources/allure-results/b81da3c0-1b9d-4219-9e35-87e139ec446c-attachment.csv: -------------------------------------------------------------------------------- 1 | abra,kada,bra 2 | 1,2,3 3 | aaa,bbb,ccc 4 | ddd,eee,fff 5 | ggg,hhh,iii 6 | jjj,kkk,lll 7 | mmm,nnn,ooo 8 | ppp,qqq,rrr 9 | sssss,t,uuuuu 10 | vvv,www,xxxxx 11 | yyyy,,zzzzzzzz -------------------------------------------------------------------------------- /allure-java-adaptor-api/src/test/resources/a.json: -------------------------------------------------------------------------------- 1 | { 2 | "filed": "simple", 3 | "complexField": { 4 | "subField": "sub-simple", 5 | "sub2Field": "sub2-simple" 6 | }, 7 | "arrayField": [ 8 | "first", 9 | "second" 10 | ] 11 | } -------------------------------------------------------------------------------- /allure-report-data/src/test/resources/testdata/META-INF/services/ru.yandex.qatools.allure.data.plugins.Plugin: -------------------------------------------------------------------------------- 1 | ru.yandex.qatools.allure.data.testdata.SomePlugin 2 | ru.yandex.qatools.allure.data.testdata.SomePreparePlugin 3 | ru.yandex.qatools.allure.data.testdata.SomeProcessPlugin 4 | -------------------------------------------------------------------------------- /allure-report-face/src/blocks/splash/styles.css: -------------------------------------------------------------------------------- 1 | .splash { 2 | margin: auto; 3 | text-align: center; 4 | &__title { 5 | font-size: 3.5em; 6 | line-height: 1; 7 | } 8 | &__subtitle { 9 | color: $text-muted-color; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/graph/GraphCollection.js: -------------------------------------------------------------------------------- 1 | import {Collection} from 'backbone'; 2 | 3 | export default class GraphCollection extends Collection { 4 | url = 'data/graph.json'; 5 | 6 | parse({testCases}) { 7 | return testCases; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /allure-report-data/src/test/groovy/ru/yandex/qatools/allure/data/testdata/SomeService.groovy: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.data.testdata 2 | 3 | /** 4 | * @author Dmitry Baev charlie@yandex-team.ru 5 | * Date: 18.02.15 6 | */ 7 | interface SomeService { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /allure-report-face/src/components/language-select/LanguageSelectView.hbs: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /allure-report-face/src/blocks/label/styles.css: -------------------------------------------------------------------------------- 1 | @import "../../mixins.css"; 2 | 3 | .label { 4 | vertical-align: baseline; 5 | letter-spacing: 1px; 6 | color: #fff; 7 | padding: 2px 4px 2px 5px; 8 | font-size: 80%; 9 | border-radius: 3px; 10 | @mixin status-bg; 11 | } 12 | -------------------------------------------------------------------------------- /allure-report-face/src/components/testcase-view/styles.css: -------------------------------------------------------------------------------- 1 | @import "../../variables.css"; 2 | 3 | .testcase { 4 | &__trace { 5 | display: none; 6 | &_visible { 7 | display: block; 8 | } 9 | } 10 | &__severity { 11 | color: $color-canceled; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | The following authors have created the source code of "Allure Framework" 2 | published and distributed by YANDEX LLC as the owner: 3 | 4 | * Dmitry Baev 5 | * Artem Eroshenko 6 | * Boris Serdyuk -------------------------------------------------------------------------------- /allure-report-data/src/test/groovy/ru/yandex/qatools/allure/data/testdata/SomeServiceImpl.groovy: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.data.testdata 2 | 3 | /** 4 | * @author Dmitry Baev charlie@yandex-team.ru 5 | * Date: 18.02.15 6 | */ 7 | class SomeServiceImpl implements SomeService { 8 | } 9 | -------------------------------------------------------------------------------- /allure-report-face/src/blocks/text/styles.css: -------------------------------------------------------------------------------- 1 | @import "../../variables.css"; 2 | 3 | .text { 4 | &_status_FAILED { 5 | color: $color-failed; 6 | } 7 | &_status_BROKEN { 8 | color: $color-broken; 9 | } 10 | &_status_CANCELED { 11 | color: $color-canceled; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /allure-report-face/src/helpers/linky.js: -------------------------------------------------------------------------------- 1 | import {SafeString} from 'handlebars/runtime'; 2 | 3 | const URL_REGEXP = /^(\w)+:\/\/.*/; 4 | 5 | export default function(text) { 6 | return URL_REGEXP.test(text) ? new SafeString(`
${text}`) : text; 7 | } 8 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/timeline/styles.css: -------------------------------------------------------------------------------- 1 | @import "../../variables.css"; 2 | 3 | .timeline { 4 | padding: $gap-size; 5 | &__item:hover { 6 | opacity: 0.7; 7 | } 8 | &__host { 9 | font-size: 18px; 10 | } 11 | &__host-bg { 12 | fill: $heading-bg; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/xunit/XUnitWidget.js: -------------------------------------------------------------------------------- 1 | import WidgetStatusView from '../../components/widget-status/WidgetStatusView'; 2 | 3 | export default class XUnitWidget extends WidgetStatusView { 4 | title = 'xUnit'; 5 | baseUrl = 'xUnit'; 6 | showAllText = 'Show all test suites'; 7 | } 8 | 9 | -------------------------------------------------------------------------------- /allure-report-face/src/components/status-toggle/StatusToggleView.hbs: -------------------------------------------------------------------------------- 1 |
2 | {{#each statistics}} 3 | 4 | {{/each}} 5 |
6 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/defects/translations/zh.json: -------------------------------------------------------------------------------- 1 | { 2 | "defects": { 3 | "TITLE": "缺陷列表", 4 | "Product defects": "产品缺陷", 5 | "Test defects": "用例缺陷", 6 | "STATISTIC": "{{count}} 个缺陷", 7 | "SHOW_ALL": "查看所有缺陷", 8 | "COUNT": "个数", 9 | "DEFECT": "缺陷" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /allure-report-face/src/components/popover/PopoverView.js: -------------------------------------------------------------------------------- 1 | import './styles.css'; 2 | import TooltipView from '../tooltip/TooltipView'; 3 | import {className} from '../../decorators'; 4 | 5 | @className('popover') 6 | class PopoverView extends TooltipView { 7 | 8 | } 9 | 10 | export default PopoverView; 11 | -------------------------------------------------------------------------------- /allure-report-face/src/helpers/time.js: -------------------------------------------------------------------------------- 1 | import pad from 'underscore.string/pad'; 2 | 3 | export default function (date) { 4 | if(!(date instanceof Date)) { 5 | date = new Date(date); 6 | } 7 | return [date.getHours(), pad(date.getMinutes(), 2, '0'), pad(date.getSeconds(), 2, '0')].join(':'); 8 | } 9 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/default/index.js: -------------------------------------------------------------------------------- 1 | import allurePlugins from '../../pluginApi'; 2 | import OverviewLayout from '../../layouts/overview/OverivewLayout'; 3 | 4 | allurePlugins.addTab('', { 5 | title: 'Overview', icon: 'fa fa-home', 6 | route: '', 7 | onEnter: () => new OverviewLayout() 8 | }); 9 | -------------------------------------------------------------------------------- /allure-report-face/src/helpers/date.js: -------------------------------------------------------------------------------- 1 | import pad from 'underscore.string/pad'; 2 | 3 | export default function (date) { 4 | if(!(date instanceof Date)) { 5 | date = new Date(date); 6 | } 7 | return [pad(date.getDate(), 2, '0'), pad(date.getMonth() + 1, 2, '0'), date.getFullYear()].join('/'); 8 | } 9 | -------------------------------------------------------------------------------- /allure-commandline/src/main/conf/command.properties: -------------------------------------------------------------------------------- 1 | #allure.locale=en 2 | 3 | #-------------------------------------------------------------------------------------------------- 4 | # Bundle 5 | 6 | #JVM options of bundle generation process 7 | #allure.bundle.javaOpts=-Xmx1024m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -------------------------------------------------------------------------------- /allure-report-face/src/plugins/defects/defect-view/DefectView.hbs: -------------------------------------------------------------------------------- 1 | {{> ../../../blocks/pane-header/pane-header baseUrl=baseUrl uid=uid title='Defect'}} 2 | 3 |
4 |
{{failure.message}}
5 |
6 | 7 |
8 | -------------------------------------------------------------------------------- /allure-report-plugin-api/src/main/java/ru/yandex/qatools/allure/data/plugins/WithPriority.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.data.plugins; 2 | 3 | /** 4 | * @author Dmitry Baev charlie@yandex-team.ru 5 | * Date: 25.04.15 6 | */ 7 | public interface WithPriority { 8 | 9 | int getPriority(); 10 | } 11 | -------------------------------------------------------------------------------- /allure-commandline/src/main/conf/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.rootLogger=INFO, stdout 2 | 3 | log4j.appender.stdout = org.apache.log4j.ConsoleAppender 4 | log4j.appender.stdout.Target=System.out 5 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 6 | log4j.appender.stdout.layout.ConversionPattern=%m%n 7 | 8 | log4j.logger.org.mortbay.log = INFO -------------------------------------------------------------------------------- /allure-report-face/src/layouts/application/styles.css: -------------------------------------------------------------------------------- 1 | @import '../../variables.css'; 2 | 3 | .app { 4 | background: $body-bg; 5 | display: flex; 6 | &__nav { 7 | padding: 0 0; 8 | } 9 | &__content { 10 | position: relative; 11 | flex: 1; 12 | } 13 | &__header { 14 | background: $header-bg; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/testcase-description/DescriptionView.hbs: -------------------------------------------------------------------------------- 1 | {{#if value}} 2 |

Description

3 | {{#if (eq type "TEXT")}} 4 |

{{value}}

5 | {{/if}} 6 | {{#if (eq type "MARKDOWN")}} 7 | {{{value}}} 8 | {{/if}} 9 | {{/if}} 10 | -------------------------------------------------------------------------------- /allure-report-plugin-api/src/main/java/ru/yandex/qatools/allure/data/io/Reader.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.data.io; 2 | 3 | import java.util.Iterator; 4 | 5 | /** 6 | * eroshenkoam 7 | * 02/02/15 8 | */ 9 | public interface Reader extends Iterable { 10 | 11 | @Override 12 | Iterator iterator(); 13 | } 14 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/behaviors/BehaviorsWidget.js: -------------------------------------------------------------------------------- 1 | import WidgetStatusView from '../../components/widget-status/WidgetStatusView'; 2 | 3 | export default class BehaviorsWidget extends WidgetStatusView { 4 | showLinks = false; 5 | title = 'Features'; 6 | baseUrl = 'behaviors'; 7 | showAllText = 'Show all user features'; 8 | } 9 | -------------------------------------------------------------------------------- /allure-report-plugin-api/src/main/java/ru/yandex/qatools/allure/data/plugins/PreparePlugin.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.data.plugins; 2 | 3 | /** 4 | * @author Dmitry Baev charlie@yandex-team.ru 5 | * Date: 09.02.15 6 | */ 7 | public interface PreparePlugin extends Plugin { 8 | 9 | void prepare(T data); 10 | 11 | } 12 | -------------------------------------------------------------------------------- /allure-report-face/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "eslint:recommended", 3 | "parser": "babel-eslint", 4 | "env": { 5 | "es6": true, 6 | "browser": true, 7 | "commonjs": true 8 | }, 9 | "rules": { 10 | "quotes": [2, "single"], 11 | "one-var": [2, "never"], 12 | "semi": [2, "always"], 13 | "eqeqeq": [2] 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /allure-report-face/src/data/widgets/WidgetsModel.js: -------------------------------------------------------------------------------- 1 | import {Model} from 'backbone'; 2 | 3 | export default class WidgetsModel extends Model { 4 | url = 'data/widgets.json'; 5 | 6 | getWidgetData(name) { 7 | const items = this.get('plugins')[name]; 8 | return new Model(Array.isArray(items) ? {items} : items); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /allure-report-face/src/blocks/attachment-row/attachment-row.hbs: -------------------------------------------------------------------------------- 1 |
2 | 3 | {{title}} 4 | 5 | {{filesize size}} 6 | 7 |
8 | -------------------------------------------------------------------------------- /allure-report-plugin-api/src/main/java/ru/yandex/qatools/allure/data/plugins/PluginLoader.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.data.plugins; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * @author Dmitry Baev charlie@yandex-team.ru 7 | * Date: 17.02.15 8 | */ 9 | public interface PluginLoader { 10 | 11 | List loadPlugins(); 12 | } 13 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/defects/translations/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "defects": { 3 | "TITLE": "Defects", 4 | "Product defects": "Product defects", 5 | "Test defects": "Test defects", 6 | "STATISTIC": "(1)({{count}} defect);(0,2-inf)({{count}} defects);", 7 | "SHOW_ALL": "Show all defects", 8 | "COUNT": "Count", 9 | "DEFECT": "Defect" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/defects/translations/ptbr.json: -------------------------------------------------------------------------------- 1 | { 2 | "defects": { 3 | "TITLE": "Erros", 4 | "Product defects": "Erros do produto", 5 | "Test defects": "Erros dos testes", 6 | "STATISTIC": "(1)({{count}} erro);(0,2-inf)({{count}} erros);", 7 | "SHOW_ALL": "Mostrar todos os erros", 8 | "COUNT": "Total", 9 | "DEFECT": "Erro" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/timeline/index.js: -------------------------------------------------------------------------------- 1 | import allurePlugins from '../../pluginApi'; 2 | import TimelineLayout from './TimelineLayout'; 3 | 4 | allurePlugins.addTab('timeline', { 5 | title: 'Timeline', 6 | icon: 'fa fa-clock-o', 7 | route: 'timeline(/:testcaseId)(/:attachmentId)', 8 | onEnter: (...routeParams) => new TimelineLayout({routeParams}) 9 | }); 10 | 11 | -------------------------------------------------------------------------------- /allure-report-face/src/grid.css: -------------------------------------------------------------------------------- 1 | .row { 2 | display: flex; 3 | &_stretch { 4 | align-items: stretch; 5 | } 6 | .col { 7 | padding: 0 1em; 8 | &:first-child { 9 | padding-left: 0; 10 | } 11 | &:last-child { 12 | padding-right: 0; 13 | } 14 | } 15 | .col_flex { 16 | flex: 1; 17 | } 18 | .col_1 { 19 | width: 8.3333333%; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /allure-report-face/src/layouts/error/ErrorLayout.js: -------------------------------------------------------------------------------- 1 | import AppLayout from '../application/AppLayout'; 2 | import ErrorSplashView from '../../components/error-splash/ErrorSplashView'; 3 | 4 | export default class ErrorLayout extends AppLayout { 5 | getContentView() { 6 | const {code, message} = this.options; 7 | return new ErrorSplashView({code, message}); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /allure-report-face/src/blocks/attachment-row/styles.css: -------------------------------------------------------------------------------- 1 | @import "../../variables.css"; 2 | 3 | .attachment-row { 4 | padding: 10px $gap-size; 5 | cursor: pointer; 6 | &:hover { 7 | background: $hover-color; 8 | } 9 | &_selected { 10 | &, &:hover { 11 | background: $selected-color; 12 | } 13 | } 14 | &__link { 15 | float: right; 16 | min-width: 70px; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/graph/index.js: -------------------------------------------------------------------------------- 1 | import allurePlugins from '../../pluginApi'; 2 | import GraphLayout from './GraphLayout'; 3 | import GraphWidget from './graph-widget/GraphWidget'; 4 | 5 | allurePlugins.addTab('graph', { 6 | title: 'Graph', icon: 'fa fa-bar-chart', 7 | route: 'graph', 8 | onEnter: () => new GraphLayout() 9 | }); 10 | allurePlugins.addWidget('total', GraphWidget); 11 | -------------------------------------------------------------------------------- /allure-testng-adaptor/src/test/java/ru/yandex/qatools/allure/testng/testdata/SimpleTestngTest.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.testng.testdata; 2 | 3 | import org.junit.Test; 4 | 5 | /** 6 | * @author Dmitry Baev charlie@yandex-team.ru 7 | * Date: 25.02.15 8 | */ 9 | public class SimpleTestngTest { 10 | 11 | @Test 12 | public void simpleTest() throws Exception { 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /allure-testng-adaptor/src/test/resources/suite1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /allure-testng-adaptor/src/test/resources/suite2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /allure-report-data/src/test/java/ru/yandex/qatools/allure/data/PluginResourcesTest.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.data; 2 | 3 | import org.junit.Test; 4 | 5 | /** 6 | * @author Dmitry Baev charlie@yandex-team.ru 7 | * Date: 22.04.15 8 | */ 9 | public class PluginResourcesTest { 10 | 11 | @Test 12 | public void shouldWritePluginResources() throws Exception { 13 | 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/defects/translations/ru.json: -------------------------------------------------------------------------------- 1 | { 2 | "defects": { 3 | "TITLE": "Дефекты", 4 | "Product defects": "Дефекты продукта", 5 | "Test defects": "Дефекты тестов", 6 | "STATISTIC": "(1)({{count}} дефект);(2-4)({{count}} дефекта};(0,5-inf)({{count}} дефектов);", 7 | "SHOW_ALL": "Показать все дефекты", 8 | "COUNT": "Кол-во", 9 | "DEFECT": "Дефект" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /allure-commandline/src/main/java/ru/yandex/qatools/allure/command/AllureCommand.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.command; 2 | 3 | /** 4 | * @author Dmitry Baev charlie@yandex-team.ru 5 | * Date: 10.08.15 6 | */ 7 | public interface AllureCommand extends Runnable { 8 | 9 | /** 10 | * Returns the exit code for command. Should not be null. 11 | */ 12 | ExitCode getExitCode(); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /allure-commandline/src/main/java/ru/yandex/qatools/allure/command/AllureHelp.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.command; 2 | 3 | import io.airlift.airline.Help; 4 | 5 | /** 6 | * @author Artem Eroshenko 7 | */ 8 | public class AllureHelp extends Help implements AllureCommand { 9 | 10 | @Override 11 | public ExitCode getExitCode() { 12 | return ExitCode.NO_ERROR; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /allure-report-face/src/components/widgets-grid/styles.css: -------------------------------------------------------------------------------- 1 | @import "../../variables.css"; 2 | 3 | .widgets-grid { 4 | position: absolute; 5 | top: 0; 6 | left: 0; 7 | right: 0; 8 | bottom: 0; 9 | padding: $gap-size $gap-size 0 $gap-size; 10 | max-height: 100%; 11 | overflow: auto; 12 | display: flex; 13 | &__col { 14 | width: 50%; 15 | } 16 | &__col + &__col { 17 | padding-left: $gap-size; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /allure-report-data/src/main/java/ru/yandex/qatools/allure/data/converters/TestCaseConverter.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.data.converters; 2 | 3 | import ru.yandex.qatools.allure.data.AllureTestCase; 4 | import ru.yandex.qatools.allure.model.TestCaseResult; 5 | 6 | /** 7 | * eroshenkoam 8 | * 02/02/15 9 | */ 10 | public interface TestCaseConverter { 11 | 12 | AllureTestCase convert(TestCaseResult testCaseResult); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /allure-report-data/src/test/groovy/ru/yandex/qatools/allure/data/testdata/SomePlugin.groovy: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.data.testdata 2 | 3 | import ru.yandex.qatools.allure.data.plugins.Plugin 4 | 5 | /** 6 | * @author Dmitry Baev charlie@yandex-team.ru 7 | * Date: 18.02.15 8 | */ 9 | class SomePlugin implements Plugin{ 10 | @Override 11 | Class getType() { 12 | return null 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /allure-report-face/src/mixins.css: -------------------------------------------------------------------------------- 1 | @import "./variables.css"; 2 | 3 | @define-mixin status-bg { 4 | &_status_PASSED { 5 | background: $color-passed; 6 | } 7 | &_status_CANCELED { 8 | background: $color-canceled; 9 | } 10 | &_status_PENDING { 11 | background: $color-pending; 12 | } 13 | &_status_FAILED { 14 | background: $color-failed; 15 | } 16 | &_status_BROKEN { 17 | background: $color-broken; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/xunit/index.js: -------------------------------------------------------------------------------- 1 | import allurePlugins from '../../pluginApi'; 2 | import XUnitLayout from './XUnitLayout'; 3 | import XUnitWidget from './XUnitWidget'; 4 | 5 | allurePlugins.addTab('xUnit', { 6 | title: 'xUnit', icon: 'fa fa-briefcase', 7 | route: 'xUnit(/:defectId)(/:testcaseId)(/:attachmentId)', 8 | onEnter: (...routeParams) => new XUnitLayout({routeParams}) 9 | }); 10 | allurePlugins.addWidget('xunit', XUnitWidget); 11 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/testcase-description/DescriptionView.js: -------------------------------------------------------------------------------- 1 | import {ItemView} from 'backbone.marionette'; 2 | import {className} from '../../decorators'; 3 | import template from './DescriptionView.hbs'; 4 | 5 | @className('pane__section') 6 | class DescriptionView extends ItemView { 7 | template = template; 8 | 9 | serializeData() { 10 | return this.model.get('description'); 11 | } 12 | } 13 | 14 | export default DescriptionView; 15 | -------------------------------------------------------------------------------- /allure-commandline/src/main/java/ru/yandex/qatools/allure/command/ExitCode.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.command; 2 | 3 | /** 4 | * @author etki 5 | */ 6 | public enum ExitCode { 7 | 8 | NO_ERROR(0), 9 | GENERIC_ERROR(1), 10 | ARGUMENT_PARSING_ERROR(127); 11 | 12 | private final int code; 13 | 14 | ExitCode(int code) { 15 | this.code = code; 16 | } 17 | 18 | public int getCode() { 19 | return code; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /allure-report-data/src/main/java/ru/yandex/qatools/allure/data/converters/TestSuiteConverter.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.data.converters; 2 | 3 | import ru.yandex.qatools.allure.data.AllureTestCase; 4 | import ru.yandex.qatools.allure.model.TestSuiteResult; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * eroshenkoam 10 | * 02/02/15 11 | */ 12 | public interface TestSuiteConverter { 13 | 14 | List convert(TestSuiteResult testSuiteResult); 15 | } 16 | -------------------------------------------------------------------------------- /allure-report-face/src/components/testcase-table/styles.css: -------------------------------------------------------------------------------- 1 | @import "../../variables.css"; 2 | 3 | .testcase-table { 4 | &__title { 5 | white-space: nowrap; 6 | float: left; 7 | line-height: 28px; 8 | margin: 0 5px 0 0; 9 | } 10 | &__statuses { 11 | float: right; 12 | } 13 | &__table { 14 | clear: both; 15 | } 16 | &__index { 17 | flex: none; 18 | width: 5%; 19 | min-width: 70px; 20 | } 21 | &__name { 22 | flex: 3; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /allure-report-data/src/main/groovy/ru/yandex/qatools/allure/data/utils/SummaryCategory.groovy: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.data.utils 2 | 3 | import ru.yandex.qatools.allure.data.Summary 4 | 5 | /** 6 | * @author Dmitry Baev charlie@yandex-team.ru 7 | * Date: 06.02.15 8 | */ 9 | @Category(Summary) 10 | class SummaryCategory { 11 | Summary plus(Summary other) { 12 | new Summary(steps: steps + other.steps, attachments: attachments + other.attachments); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/behaviors/index.js: -------------------------------------------------------------------------------- 1 | import allurePlugins from '../../pluginApi'; 2 | import BehaviorsLayout from './BehaviorsLayout'; 3 | import BehaviorsWidget from './BehaviorsWidget'; 4 | 5 | allurePlugins.addTab('behaviors', { 6 | title: 'Behaviors', icon: 'fa fa-list', 7 | route: 'behaviors(/:defectId)(/:testcaseId)(/:attachmentId)', 8 | onEnter: (...routeParams) => new BehaviorsLayout({routeParams}) 9 | }); 10 | allurePlugins.addWidget('behaviors', BehaviorsWidget); 11 | -------------------------------------------------------------------------------- /allure-report-plugin-api/src/main/java/ru/yandex/qatools/allure/data/plugins/WithData.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.data.plugins; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * @author Dmitry Baev charlie@yandex-team.ru 7 | * Date: 24.04.15 8 | * @see AbstractPlugin 9 | */ 10 | public interface WithData { 11 | 12 | /** 13 | * Using this method plugin can store some information to 14 | * data folder. 15 | */ 16 | List getPluginData(); 17 | } 18 | -------------------------------------------------------------------------------- /allure-report-face/src/helpers/status-bar.js: -------------------------------------------------------------------------------- 1 | import {SafeString} from 'handlebars/runtime'; 2 | 3 | export default function statusBar(statistic) { 4 | const fill = ['failed', 'broken', 'canceled', 'pending', 'passed'].map(status => 5 | `
${statistic[status]}
` 7 | ).join(''); 8 | return new SafeString(`
${fill}
`); 9 | } 10 | -------------------------------------------------------------------------------- /allure-report-face/src/blocks/bar/styles.css: -------------------------------------------------------------------------------- 1 | @import "../../variables.css"; 2 | @import "../../mixins.css"; 3 | 4 | .bar { 5 | height: 18px; 6 | overflow: hidden; 7 | position: relative; 8 | border-radius: 4px; 9 | background: #eee; 10 | &__fill { 11 | display: inline-block; 12 | overflow: hidden; 13 | height: 18px; 14 | background: $brand-blue; 15 | text-align: center; 16 | color: #fff; 17 | font-size: 12px; 18 | line-height: 18px; 19 | @mixin status-bg; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Contributing 2 | 3 | We love pull requests from everyone. 4 | 5 | Fork, then clone the repo: 6 | 7 | ```bash 8 | $ git clone git@github.com:your-username/allure1.git 9 | ``` 10 | 11 | Then build the project (build requires JDK 1.7 or higher): 12 | 13 | ```bash 14 | $ ./mvnw clean install 15 | ``` 16 | 17 | Make your change. Add tests for your change. Make sure all the tests pass: 18 | 19 | ```bash 20 | $ ./gradlew verify 21 | ``` 22 | 23 | Push your fork and submit a pull request. 24 | 25 | -------------------------------------------------------------------------------- /allure-commandline/src/it/generate/results/sample-testsuite.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | my.company.Sample 5 | 6 | 7 | sampleTestCase 8 | 9 | 10 | -------------------------------------------------------------------------------- /allure-java-adaptor-api/src/test/java/ru/yandex/qatools/allure/experimental/testdata/FailingListener.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.experimental.testdata; 2 | 3 | import ru.yandex.qatools.allure.experimental.LifecycleListener; 4 | 5 | /** 6 | * @author Dmitry Baev charlie@yandex-team.ru 7 | * Date: 04.06.14 8 | */ 9 | public class FailingListener extends LifecycleListener { 10 | 11 | public FailingListener() throws Exception { 12 | throw new Exception("Initialization error"); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /allure-commandline/src/it/generate-from-path/results/sample-testsuite.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | my.company.Sample 5 | 6 | 7 | sampleTestCase 8 | 9 | 10 | -------------------------------------------------------------------------------- /allure-report-data/src/main/resources/META-INF/services/ru.yandex.qatools.allure.data.plugins.Plugin: -------------------------------------------------------------------------------- 1 | ru.yandex.qatools.allure.data.plugins.MigrationPlugin 2 | ru.yandex.qatools.allure.data.plugins.XUnitPlugin 3 | ru.yandex.qatools.allure.data.plugins.TimelinePlugin 4 | ru.yandex.qatools.allure.data.plugins.BehaviorsPlugin 5 | ru.yandex.qatools.allure.data.plugins.DefectsPlugin 6 | ru.yandex.qatools.allure.data.plugins.GraphPlugin 7 | ru.yandex.qatools.allure.data.plugins.EnvironmentPlugin 8 | ru.yandex.qatools.allure.data.plugins.TotalPlugin 9 | -------------------------------------------------------------------------------- /allure-report-face/src/index.js: -------------------------------------------------------------------------------- 1 | import App from './app'; 2 | import $ from 'jquery'; 3 | import './plugins/default'; 4 | import './plugins/defects'; 5 | import './plugins/environment'; 6 | import './plugins/xunit'; 7 | import './plugins/behaviors'; 8 | import './plugins/graph'; 9 | import './plugins/timeline'; 10 | import './plugins/report-stats'; 11 | 12 | import './plugins/testcase-parameters'; 13 | import './plugins/testcase-description'; 14 | import './plugins/testcase-links'; 15 | 16 | App.start(); 17 | 18 | window.jQuery = $; 19 | -------------------------------------------------------------------------------- /allure-java-adaptor-api/src/main/java/ru/yandex/qatools/allure/events/StepEvent.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.events; 2 | 3 | import ru.yandex.qatools.allure.model.Step; 4 | 5 | /** 6 | * Implement this interface to allow access to current step context. 7 | * Usage see at {@link ru.yandex.qatools.allure.Allure} 8 | * 9 | * @author Dmitry Baev charlie@yandex-team.ru 10 | * Date: 13.12.13 11 | *

12 | * @see ru.yandex.qatools.allure.events.Event 13 | */ 14 | public interface StepEvent extends Event { 15 | } 16 | -------------------------------------------------------------------------------- /allure-report-data/src/test/groovy/ru/yandex/qatools/allure/data/testdata/SomePreparePlugin.groovy: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.data.testdata 2 | 3 | import ru.yandex.qatools.allure.data.plugins.PreparePlugin 4 | 5 | /** 6 | * @author Dmitry Baev charlie@yandex-team.ru 7 | * Date: 18.02.15 8 | */ 9 | class SomePreparePlugin implements PreparePlugin { 10 | @Override 11 | void prepare(Integer data) { 12 | } 13 | 14 | @Override 15 | Class getType() { 16 | return null 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /allure-commandline/src/it/generate with space in path/results directory/sample-testsuite.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | my.company.Sample 5 | 6 | 7 | sampleTestCase 8 | 9 | 10 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/defects/defects-list/styles.css: -------------------------------------------------------------------------------- 1 | @import "../../../variables.css"; 2 | 3 | .defects-list { 4 | &__title { 5 | &_status_BROKEN { 6 | border-bottom-color: $color-broken; 7 | } 8 | &_status_FAILED { 9 | border-bottom-color: $color-failed; 10 | } 11 | } 12 | &__count { 13 | font-size: 70%; 14 | font-weight: normal; 15 | } 16 | &__table { 17 | margin-top: $gap-size; 18 | } 19 | &__count-col { 20 | flex: none; 21 | width: 5%; 22 | min-width: 100px; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/xunit/testsuites-list/styles.css: -------------------------------------------------------------------------------- 1 | @import "../../../variables.css"; 2 | 3 | @define-mixin statused $name { 4 | &_$(name) { 5 | border-bottom: 3px solid $color-$(name); 6 | } 7 | } 8 | 9 | .testsuites-list { 10 | &__title { 11 | overflow: hidden; 12 | } 13 | &__name { 14 | flex: 3; 15 | } 16 | &__statuses { 17 | float: right; 18 | } 19 | } 20 | 21 | .table__col { 22 | @mixin statused failed; 23 | @mixin statused broken; 24 | @mixin statused canceled; 25 | @mixin statused pending; 26 | } 27 | -------------------------------------------------------------------------------- /allure-report-face/src/blocks/pane-header/pane-header.hbs: -------------------------------------------------------------------------------- 1 | 2 |

3 | 4 | 5 | 6 | 7 | 8 | {{title}} 9 |

10 | -------------------------------------------------------------------------------- /allure-report-face/src/components/error-splash/ErrorSplashView.js: -------------------------------------------------------------------------------- 1 | import {ItemView} from 'backbone.marionette'; 2 | import {className} from '../../decorators'; 3 | import template from './ErrorSplashView.hbs'; 4 | 5 | @className('error-splash') 6 | class ErrorSplashView extends ItemView { 7 | template = template; 8 | 9 | serializeData() { 10 | return { 11 | cls: this.className, 12 | code: this.options.code, 13 | message: this.options.message 14 | }; 15 | } 16 | } 17 | 18 | export default ErrorSplashView; 19 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/testcase-parameters/ParametersView.hbs: -------------------------------------------------------------------------------- 1 | {{#if arguments.length}} 2 |

Arguments

3 |

4 | {{#each arguments}} 5 | {{name}} = {{value}}{{#unless @last}};{{/unless}} 6 | {{/each}} 7 |

8 | {{/if}} 9 | 10 | {{#if environment.length}} 11 |

Environment

12 | {{#each environment}} 13 |
14 | {{name}}: 15 | {{linky value}} 16 |
17 | {{/each}} 18 | {{/if}} 19 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/timeline/TimelineModel.js: -------------------------------------------------------------------------------- 1 | import {Model} from 'backbone'; 2 | import {flatten} from 'underscore'; 3 | 4 | export default class TimelineModel extends Model { 5 | url = 'data/timeline.json'; 6 | 7 | getAllTestcases() { 8 | if(!this.allTestcases) { 9 | this.allTestcases = flatten(this.get('hosts') 10 | .map(host => 11 | host.threads.map(thread => thread.testCases) 12 | ) 13 | ); 14 | } 15 | return this.allTestcases; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /allure-report-face/src/blocks/alert/styles.css: -------------------------------------------------------------------------------- 1 | @import "../../variables.css"; 2 | 3 | .alert { 4 | padding: $gap-size; 5 | &__code { 6 | margin: 0; 7 | word-break: break-word; 8 | } 9 | &_status_PASSED { 10 | background: $background-passed; 11 | } 12 | &_status_PENDING { 13 | background: $background-pending; 14 | } 15 | &_status_CANCELED { 16 | background: $background-canceled; 17 | } 18 | &_status_BROKEN { 19 | background: $background-broken; 20 | } 21 | &_status_FAILED { 22 | background: $background-failed; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /allure-testng-adaptor/src/test/resources/suite-groups.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /allure-commandline/src/main/java/ru/yandex/qatools/allure/command/AllureCommandException.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.command; 2 | 3 | /** 4 | * The exception indicates about some problems during Allure commandline execution. 5 | * 6 | * @author Artem Eroshenko 7 | */ 8 | public class AllureCommandException extends RuntimeException { 9 | 10 | public AllureCommandException(String message) { 11 | super(message); 12 | } 13 | 14 | public AllureCommandException(Throwable cause) { 15 | super(cause); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /allure-java-adaptor-api/src/main/java/ru/yandex/qatools/allure/events/TestCaseEvent.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.events; 2 | 3 | import ru.yandex.qatools.allure.model.TestCaseResult; 4 | 5 | /** 6 | * Implement this interface to allow access to current testCase context. 7 | * Usage see at {@link ru.yandex.qatools.allure.Allure} 8 | * 9 | * @author Dmitry Baev charlie@yandex-team.ru 10 | * Date: 13.12.13 11 | *

12 | * @see ru.yandex.qatools.allure.events.Event 13 | */ 14 | public interface TestCaseEvent extends Event { 15 | } 16 | -------------------------------------------------------------------------------- /allure-report-face/src/components/widget-status/WidgetStatusView.js: -------------------------------------------------------------------------------- 1 | import {ItemView} from 'backbone.marionette'; 2 | import template from './WidgetStatusView.hbs'; 3 | 4 | export default class WidgetStatusView extends ItemView { 5 | template = template; 6 | showLinks = true; 7 | 8 | serializeData() { 9 | return Object.assign(super.serializeData(), { 10 | rowTag: this.showLinks ? 'a' : 'span', 11 | title: this.title, 12 | showAllText: this.showAllText, 13 | baseUrl: this.baseUrl 14 | }); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /allure-report-face/src/layouts/overview/OverivewLayout.js: -------------------------------------------------------------------------------- 1 | import AppLayout from '../application/AppLayout'; 2 | import WidgetsModel from '../../data/widgets/WidgetsModel'; 3 | import WidgetsGridView from '../../components/widgets-grid/WidgetsGridView'; 4 | 5 | export default class OverivewLayout extends AppLayout { 6 | 7 | initialize() { 8 | this.model = new WidgetsModel(); 9 | } 10 | 11 | loadData() { 12 | return this.model.fetch(); 13 | } 14 | 15 | getContentView() { 16 | return new WidgetsGridView({model: this.model}); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/graph/GraphLayout.js: -------------------------------------------------------------------------------- 1 | import AppLayout from '../../layouts/application/AppLayout'; 2 | import GraphCollection from './GraphCollection'; 3 | import GraphsView from './GraphsView'; 4 | 5 | export default class GraphLayout extends AppLayout { 6 | 7 | initialize() { 8 | super.initialize(); 9 | this.testcases = new GraphCollection(); 10 | } 11 | 12 | loadData() { 13 | return this.testcases.fetch(); 14 | } 15 | 16 | getContentView() { 17 | return new GraphsView({collection: this.testcases}); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /allure-java-annotations/src/main/java/ru/yandex/qatools/allure/annotations/TestCaseId.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.annotations; 2 | 3 | import java.lang.annotation.*; 4 | 5 | /** 6 | * Use this annotation to link a test method with a test case in Test Management System (TMS). Usage: 7 | *

 8 |  * @TestCaseId("MYPROJECT-1")
 9 |  * public void myTest() {
10 |  *     ...
11 |  * }
12 |  * 
13 | */ 14 | @Documented 15 | @Retention(RetentionPolicy.RUNTIME) 16 | @Target({ElementType.METHOD}) 17 | public @interface TestCaseId { 18 | 19 | String value(); 20 | 21 | } 22 | -------------------------------------------------------------------------------- /allure-report-plugin-api/src/main/java/ru/yandex/qatools/allure/data/io/ResultDirectories.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.data.io; 2 | 3 | import com.google.inject.BindingAnnotation; 4 | 5 | import java.lang.annotation.ElementType; 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.RetentionPolicy; 8 | import java.lang.annotation.Target; 9 | 10 | /** 11 | * eroshenkoam 12 | * 02/02/15 13 | */ 14 | @Target({ElementType.FIELD, ElementType.PARAMETER}) 15 | @Retention(RetentionPolicy.RUNTIME) 16 | @BindingAnnotation 17 | public @interface ResultDirectories { 18 | } 19 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/testcase-links/LinksView.hbs: -------------------------------------------------------------------------------- 1 | {{#if hasLinks}} 2 |

Links

3 | {{#each testIds}} 4 | 5 | 6 | {{this.name}} 7 | {{/each}} 8 | {{#each issues}} 9 | 10 | 11 | {{this.name}} 12 | {{/each}} 13 | 14 | {{/if}} 15 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/behaviors/data/BehaviorsModel.js: -------------------------------------------------------------------------------- 1 | import {Model} from 'backbone'; 2 | import {findWhere} from 'underscore'; 3 | 4 | export default class BehaviorsModel extends Model { 5 | url = 'data/behaviors.json'; 6 | 7 | getBehavior(uid) { 8 | const behavior = this.get('features').reduce((behavior, feature) => { 9 | return behavior || findWhere(feature.stories, {uid}); 10 | }, null); 11 | if(!behavior) { 12 | throw new Error('Unable to find story ' + uid); 13 | } 14 | return new Model(behavior); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/graph/graph-widget/GraphWidget.js: -------------------------------------------------------------------------------- 1 | import {LayoutView} from 'backbone.marionette'; 2 | import StatusChart from '../charts/StatusChart'; 3 | import {region} from '../../../decorators'; 4 | import template from './GraphWidget.hbs'; 5 | 6 | export default class GraphWidget extends LayoutView { 7 | template = template; 8 | 9 | @region('.graph-widget__chart') 10 | chart; 11 | 12 | onShow() { 13 | this.chart.show(new StatusChart({ 14 | statistic: this.model.get('statistic'), 15 | showLegend: false 16 | })); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /allure-java-adaptor-api/src/main/java/ru/yandex/qatools/allure/events/TestSuiteEvent.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.events; 2 | 3 | import ru.yandex.qatools.allure.model.TestSuiteResult; 4 | 5 | /** 6 | * Implement this interface to allow access to current testSuite context. 7 | * Usage see at {@link ru.yandex.qatools.allure.Allure} 8 | * 9 | * @author Dmitry Baev charlie@yandex-team.ru 10 | * Date: 13.12.13 11 | *

12 | * @see ru.yandex.qatools.allure.events.Event 13 | */ 14 | public interface TestSuiteEvent extends Event { 15 | String getUid(); 16 | } 17 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/testcase-links/LinksView.js: -------------------------------------------------------------------------------- 1 | import './styles.css'; 2 | import {ItemView} from 'backbone.marionette'; 3 | import {className} from '../../decorators'; 4 | import template from './LinksView.hbs'; 5 | 6 | @className('pane__section') 7 | class IssuesView extends ItemView { 8 | template = template; 9 | 10 | serializeData() { 11 | const {testIds, issues} = this.model.attributes; 12 | return { 13 | hasLinks: testIds.length > 0 || issues.length > 0, 14 | testIds, issues 15 | }; 16 | } 17 | } 18 | 19 | export default IssuesView; 20 | -------------------------------------------------------------------------------- /allure-report-face/src/behaviors/LoadBehavior.js: -------------------------------------------------------------------------------- 1 | import {Behavior} from 'backbone.marionette'; 2 | 3 | export default class LoadBehavior extends Behavior { 4 | initialize() { 5 | const renderView = this.view.render.bind(this.view); 6 | this.loaded = false; 7 | this.view.render = () => { 8 | if(this.loaded) { 9 | renderView(); 10 | } else { 11 | this.view.loadData().then(() => { 12 | this.loaded = true; 13 | renderView(); 14 | }); 15 | } 16 | }; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /allure-model/src/test/java/ru/yandex/qatools/allure/config/VersionTest.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.config; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.hamcrest.core.Is.is; 6 | import static org.junit.Assert.assertThat; 7 | 8 | /** 9 | * @author Dmitry Baev charlie@yandex-team.ru 10 | * Date: 23.05.14 11 | */ 12 | public class VersionTest { 13 | @Test 14 | public void versionTest() throws Exception { 15 | assertThat( 16 | AllureConfig.newInstance().getVersion(), 17 | is(System.getProperty("project.version")) 18 | ); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /allure-report-data/src/test/resources/testresults/invalidxmlcharacters-testsuite.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | my.company 5 | 6 | 7 | &1234567890someStep 8 | Ω≈ç√∫˜≤≥ç!@#$%^*()йцукенгшщзхъфывапролджэёячсмитьбю 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /allure-report-plugin-api/src/main/java/ru/yandex/qatools/allure/data/plugins/ProcessPlugin.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.data.plugins; 2 | 3 | /** 4 | * Base interface for all plugin which collect some information 5 | * from allure results. 6 | * 7 | * @author Dmitry Baev charlie@yandex-team.ru 8 | * Date: 12.02.15 9 | */ 10 | public interface ProcessPlugin extends Plugin { 11 | 12 | /** 13 | * All results with type T will passed to this method. 14 | * You can change given object - it will not affect other plugins. 15 | */ 16 | void process(T data); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /allure-report-plugin-api/src/main/java/ru/yandex/qatools/allure/data/plugins/PluginData.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.data.plugins; 2 | 3 | /** 4 | * @author Dmitry Baev charlie@yandex-team.ru 5 | * Date: 09.02.15 6 | */ 7 | public class PluginData { 8 | 9 | private String name; 10 | 11 | private Object data; 12 | 13 | public PluginData(String name, Object data) { 14 | this.name = name; 15 | this.data = data; 16 | } 17 | 18 | public String getName() { 19 | return name; 20 | } 21 | 22 | public Object getData() { 23 | return data; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /allure-report-plugin-api/src/main/java/ru/yandex/qatools/allure/data/plugins/DefaultTabPlugin.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.data.plugins; 2 | 3 | import ru.yandex.qatools.allure.data.AllureTestCase; 4 | 5 | /** 6 | * Base class for all tab plugins. 7 | * 8 | * @author Dmitry Baev charlie@yandex-team.ru 9 | * Date: 17.04.15 10 | * @see ProcessPlugin 11 | */ 12 | public abstract class DefaultTabPlugin extends AbstractPlugin 13 | implements ProcessPlugin { 14 | 15 | @Override 16 | public Class getType() { 17 | return AllureTestCase.class; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /allure-report-face/src/util/highlight.js: -------------------------------------------------------------------------------- 1 | import highlight from 'highlight.js/lib/highlight'; 2 | import xml from 'highlight.js/lib/languages/xml'; 3 | import bash from 'highlight.js/lib/languages/bash'; 4 | import md from 'highlight.js/lib/languages/markdown'; 5 | import diff from 'highlight.js/lib/languages/diff'; 6 | import json from 'highlight.js/lib/languages/json'; 7 | 8 | highlight.registerLanguage('xml', xml); 9 | highlight.registerLanguage('bash', bash); 10 | highlight.registerLanguage('markdown', md); 11 | highlight.registerLanguage('diff', diff); 12 | highlight.registerLanguage('json', json); 13 | 14 | export default highlight; 15 | -------------------------------------------------------------------------------- /allure-report-data/src/test/groovy/ru/yandex/qatools/allure/data/testdata/SomePluginWithResources.groovy: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.data.testdata 2 | 3 | import ru.yandex.qatools.allure.data.AllureTestCase 4 | import ru.yandex.qatools.allure.data.plugins.Plugin 5 | import ru.yandex.qatools.allure.data.plugins.DefaultTabPlugin 6 | 7 | /** 8 | * @author Dmitry Baev charlie@yandex-team.ru 9 | * Date: 22.04.15 10 | */ 11 | @Plugin.Name("somePluginWithResources") 12 | class SomePluginWithResources extends DefaultTabPlugin { 13 | 14 | @Override 15 | void process(AllureTestCase data) { 16 | //do nothing 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/graph/graph-widget/GraphWidget.hbs: -------------------------------------------------------------------------------- 1 |

{{t "TEST_RUN"}} 2 | 3 | {{t "STARTED_AT" date=(date time.start) time=(time time.start)}} 4 | 5 |

6 | 7 |
8 |
9 |
{{ statistic.total }}
10 |
Cases in {{duration time.duration}}
11 |
12 | 13 |
14 |
15 | -------------------------------------------------------------------------------- /allure-report-plugin-api/src/main/java/ru/yandex/qatools/allure/data/plugins/PluginClassLoader.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.data.plugins; 2 | 3 | import com.google.inject.BindingAnnotation; 4 | 5 | import java.lang.annotation.ElementType; 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.RetentionPolicy; 8 | import java.lang.annotation.Target; 9 | 10 | /** 11 | * @author Dmitry Baev charlie@yandex-team.ru 12 | * Date: 18.02.15 13 | */ 14 | @Target({ElementType.FIELD, ElementType.PARAMETER}) 15 | @Retention(RetentionPolicy.RUNTIME) 16 | @BindingAnnotation 17 | public @interface PluginClassLoader { 18 | } 19 | -------------------------------------------------------------------------------- /allure-junit-adaptor/src/test/java/ru/yandex/qatools/allure/junit/testdata/ClassWithIgnoreAnnotatedMethod.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.junit.testdata; 2 | 3 | import org.junit.Ignore; 4 | import org.junit.Test; 5 | 6 | /** 7 | * User: lanwen 8 | * Date: 04.05.14 9 | * Time: 2:08 10 | */ 11 | public class ClassWithIgnoreAnnotatedMethod { 12 | 13 | public static final String METHOD_NAME_WITH_IGNORE = "methodWithIgnoreAnnotation"; 14 | 15 | public static final String IGNORE_VALUE = "ignore-value"; 16 | 17 | @Test 18 | @Ignore(IGNORE_VALUE) 19 | public void methodWithIgnoreAnnotation() throws Exception { 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /allure-report-face/src/blocks/spinner/styles.css: -------------------------------------------------------------------------------- 1 | $spinner-color: #fc0; 2 | 3 | .spinner { 4 | position: relative; 5 | animation: spinner 1s infinite linear; 6 | width: 32px; 7 | height: 32px; 8 | 9 | &::before { 10 | content: ' '; 11 | position: absolute; 12 | top: 0; 13 | left: 0; 14 | right: 0; 15 | bottom: 0; 16 | border: 2px solid #fc0; 17 | border-radius: 100%; 18 | border-right-color: transparent; 19 | border-top-color: transparent; 20 | } 21 | } 22 | 23 | @keyframes spinner { 24 | 0% { 25 | transform: rotate(0deg); 26 | } 27 | 100% { 28 | transform: rotate(360deg); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /allure-report-face/tools/serve.js: -------------------------------------------------------------------------------- 1 | /*eslint-env node*/ 2 | const webpack = require('webpack'); 3 | const config = require('../webpack.config').factory(true); 4 | //const express = require('express'); 5 | const WebpackDevServer = require('webpack-dev-server'); 6 | const port = process.env.PORT || 3000; 7 | 8 | config.entry.unshift(`webpack-dev-server/client?http://localhost:${port}`, 'webpack/hot/dev-server'); 9 | const compiler = webpack(config); 10 | const server = new WebpackDevServer(compiler, { 11 | contentBase: './target/allure-report', 12 | stats: { colors: true }, 13 | inline: true, 14 | hot: true 15 | }); 16 | server.listen(port); 17 | -------------------------------------------------------------------------------- /allure-report-face/src/components/steps/arrow.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /allure-java-adaptor-api/src/test/java/ru/yandex/qatools/allure/ChangeTestCaseTitleEvent.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure; 2 | 3 | import ru.yandex.qatools.allure.events.TestCaseEvent; 4 | import ru.yandex.qatools.allure.model.TestCaseResult; 5 | 6 | /** 7 | * @author Dmitry Baev charlie@yandex-team.ru 8 | * Date: 15.12.13 9 | */ 10 | public class ChangeTestCaseTitleEvent implements TestCaseEvent { 11 | private String title; 12 | 13 | public ChangeTestCaseTitleEvent(String title) { 14 | this.title = title; 15 | } 16 | 17 | @Override 18 | public void process(TestCaseResult context) { 19 | context.setTitle(title); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /allure-report-data/src/main/resources/index.html.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Allure 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | 14 | 15 |
16 | 17 | 18 | <#--TODO: load plugins here--> 19 | <#--Plugins--> 20 | <#list plugins as plugin> 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/defects/defects-collection/DefectsCollection.js: -------------------------------------------------------------------------------- 1 | import {Collection} from 'backbone'; 2 | 3 | export default class DefectsCollection extends Collection { 4 | url = 'data/defects.json'; 5 | 6 | initialize() { 7 | this.on('sync', this.updateDefects, this); 8 | } 9 | 10 | updateDefects() { 11 | this.each(type => { 12 | type.get('defects').forEach(defect => { 13 | defect.status = type.get('status'); 14 | }); 15 | }); 16 | this.allDefects = [].concat(...this.pluck('defects')); 17 | } 18 | 19 | parse({defectsList}) { 20 | return defectsList; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /allure-testng-adaptor/src/test/resources/suite3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /allure-java-adaptor-api/src/main/java/ru/yandex/qatools/allure/events/Event.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.events; 2 | 3 | /** 4 | * User of this interface has control over test context 5 | * 6 | * @author Dmitry Baev charlie@yandex-team.ru 7 | * Date: 11.11.13 8 | *

9 | * @see ru.yandex.qatools.allure.events.StepEvent 10 | * @see ru.yandex.qatools.allure.events.TestCaseEvent 11 | * @see ru.yandex.qatools.allure.events.TestSuiteEvent 12 | */ 13 | public interface Event { 14 | 15 | /** 16 | * Use this method to change test context 17 | * 18 | * @param context which can be changed 19 | */ 20 | void process(T context); 21 | } 22 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/testcase-parameters/ParametersView.js: -------------------------------------------------------------------------------- 1 | import './styles.css'; 2 | import {ItemView} from 'backbone.marionette'; 3 | import {className} from '../../decorators'; 4 | import template from './ParametersView.hbs'; 5 | 6 | @className('pane__section') 7 | class ParametersView extends ItemView { 8 | template = template; 9 | 10 | serializeData() { 11 | const parameters = this.model.get('parameters'); 12 | return { 13 | arguments: parameters.filter(p => p.kind === 'ARGUMENT'), 14 | environment: parameters.filter(p => p.kind === 'ENVIRONMENT_VARIABLE') 15 | }; 16 | } 17 | } 18 | 19 | export default ParametersView; 20 | -------------------------------------------------------------------------------- /allure-report-face/src/util/sorting.js: -------------------------------------------------------------------------------- 1 | import {sortBy} from 'underscore'; 2 | 3 | function getByPath(obj, path) { 4 | return path.split('.').reduce((context, key) => context[key], obj); 5 | } 6 | 7 | export function updateSort(sortField, {field, order}) { 8 | if(sortField === field) { 9 | order = order === 'asc' ? 'desc' : 'asc'; 10 | return {field, order}; 11 | } 12 | return {field: sortField, order: 'asc'}; 13 | } 14 | 15 | 16 | export function doSort(array, {field, order}) { 17 | const result = sortBy(array, item => getByPath(item, field)); 18 | if(order === 'desc') { 19 | return result.reverse(); 20 | } 21 | return result; 22 | } 23 | -------------------------------------------------------------------------------- /allure-report-data/src/main/groovy/ru/yandex/qatools/allure/data/plugins/PluginStorage.groovy: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.data.plugins 2 | 3 | import groovy.transform.CompileStatic 4 | import groovy.transform.PackageScope 5 | 6 | /** 7 | * Internal storage for plugins. 8 | * 9 | * @author Dmitry Baev charlie@yandex-team.ru 10 | * Date: 25.04.15 11 | */ 12 | @PackageScope 13 | @CompileStatic 14 | class PluginStorage extends HashMap> { 15 | PluginStorage(List plugins) { 16 | for (T plugin : plugins) { 17 | containsKey(plugin.type) ? get(plugin.type).add(plugin) : put(plugin.type, [plugin]) 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /allure-junit-adaptor/src/test/java/ru/yandex/qatools/allure/junit/testdata/TestClassWithExceptionInBefore.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.junit.testdata; 2 | 3 | import org.junit.BeforeClass; 4 | import org.junit.Test; 5 | import ru.yandex.qatools.allure.annotations.Title; 6 | 7 | /** 8 | * @author Dmitry Baev charlie@yandex-team.ru 9 | * Date: 16.10.14 10 | */ 11 | public class TestClassWithExceptionInBefore { 12 | 13 | @BeforeClass 14 | public static void beforeClass() throws Exception { 15 | throw new Exception("Exception if before class"); 16 | } 17 | 18 | @Title("Some test title") 19 | @Test 20 | public void someTest() throws Exception { 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /allure-java-adaptor-api/src/test/java/ru/yandex/qatools/allure/storages/TestCaseStorageTest.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.storages; 2 | 3 | import org.junit.Test; 4 | import ru.yandex.qatools.allure.model.TestCaseResult; 5 | 6 | import static org.junit.Assert.assertEquals; 7 | import static org.junit.Assert.assertTrue; 8 | 9 | /** 10 | * @author Dmitry Baev charlie@yandex-team.ru 11 | * Date: 14.12.13 12 | */ 13 | public class TestCaseStorageTest { 14 | 15 | @Test 16 | public void simpleTest() throws Exception { 17 | TestCaseStorage storage = new TestCaseStorage(); 18 | TestCaseResult testCase = storage.get(); 19 | assertTrue(testCase == storage.get()); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /allure-java-adaptor-api/src/main/java/ru/yandex/qatools/allure/events/StepFinishedEvent.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.events; 2 | 3 | 4 | import ru.yandex.qatools.allure.model.Step; 5 | 6 | /** 7 | * Using to mark step finished 8 | * 9 | * @author Dmitry Baev charlie@yandex-team.ru 10 | * Date: 11.11.13 11 | *

12 | * @see ru.yandex.qatools.allure.Allure 13 | */ 14 | public class StepFinishedEvent extends AbstractStepFinishedEvent { 15 | 16 | /** 17 | * Sets stop time to specified step 18 | * 19 | * @param step which will be changed 20 | */ 21 | @Override 22 | public void process(Step step) { 23 | step.setStop(System.currentTimeMillis()); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /allure-java-annotations/src/main/java/ru/yandex/qatools/allure/annotations/Title.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.annotations; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * Use this annotation to set test suite and test case title. 11 | * Title overrides default name in report. 12 | * 13 | * @author Dmitry Baev charlie@yandex-team.ru 14 | * Date: 10.24.13 15 | */ 16 | @Documented 17 | @Retention(RetentionPolicy.RUNTIME) 18 | @Target({ElementType.METHOD, ElementType.TYPE}) 19 | public @interface Title { 20 | 21 | String value(); 22 | } -------------------------------------------------------------------------------- /allure-report-data/src/main/resources/xsd/graph-plugin.xsd: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /allure-report-data/src/test/groovy/ru/yandex/qatools/allure/data/testdata/SomeProcessPlugin.groovy: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.data.testdata 2 | 3 | import ru.yandex.qatools.allure.data.plugins.PluginData 4 | import ru.yandex.qatools.allure.data.plugins.ProcessPlugin 5 | import ru.yandex.qatools.allure.data.plugins.WithData 6 | 7 | /** 8 | * @author Dmitry Baev charlie@yandex-team.ru 9 | * Date: 18.02.15 10 | */ 11 | class SomeProcessPlugin implements ProcessPlugin, WithData { 12 | @Override 13 | void process(Object data) { 14 | } 15 | 16 | @Override 17 | List getPluginData() { 18 | return null 19 | } 20 | 21 | @Override 22 | Class getType() { 23 | return null 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /allure-report-face/src/components/popover/styles.css: -------------------------------------------------------------------------------- 1 | @import "../../variables.css"; 2 | 3 | .popover { 4 | position: absolute; 5 | background: #fff; 6 | color: $text-color; 7 | border: 1px solid $border-accent-color; 8 | padding: 8px; 9 | font-size: 14px; 10 | &::before, &::after { 11 | content: ' '; 12 | position: absolute; 13 | border: 8px solid transparent; 14 | top: 50%; 15 | margin-top: -8px; 16 | } 17 | &_position_right { 18 | &::before { 19 | left: -16px; 20 | border-right-color: $border-accent-color; 21 | } 22 | &::after { 23 | left: -15px; 24 | border-right-color: #fff; 25 | } 26 | } 27 | &__list { 28 | margin: 0.5em 0; 29 | padding-left: 20px; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/xunit/xunit-collection/XUnitCollection.js: -------------------------------------------------------------------------------- 1 | import {Collection} from 'backbone'; 2 | 3 | export default class XUnitCollection extends Collection { 4 | url = 'data/xunit.json'; 5 | 6 | parse({time, testSuites}) { 7 | this.time = time; 8 | this.statistic = testSuites.reduce((statistic, testsuite) => { 9 | ['passed', 'pending', 'canceled', 'broken', 'failed', 'total'].forEach(function(status) { 10 | if(!statistic[status]) { 11 | statistic[status] = 0; 12 | } 13 | statistic[status] += testsuite.statistic[status]; 14 | }); 15 | return statistic; 16 | }, {}); 17 | return testSuites; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /allure-java-adaptor-api/src/main/java/ru/yandex/qatools/allure/events/TestCaseFinishedEvent.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.events; 2 | 3 | import ru.yandex.qatools.allure.model.TestCaseResult; 4 | 5 | /** 6 | * Uisng to mark testCase finished 7 | * 8 | * @author Dmitry Baev charlie@yandex-team.ru 9 | * Date: 11.11.13 10 | *

11 | * @see ru.yandex.qatools.allure.Allure 12 | */ 13 | public class TestCaseFinishedEvent extends AbstractTestCaseFinishedEvent { 14 | 15 | /** 16 | * Sets stop time to specified testCase 17 | * 18 | * @param testCase which will be changed 19 | */ 20 | @Override 21 | public void process(TestCaseResult testCase) { 22 | testCase.setStop(System.currentTimeMillis()); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /allure-report-data/src/main/groovy/ru/yandex/qatools/allure/data/plugins/GraphPlugin.groovy: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.data.plugins 2 | 3 | import ru.yandex.qatools.allure.data.AllureGraph 4 | import ru.yandex.qatools.allure.data.AllureTestCase 5 | import ru.yandex.qatools.allure.data.utils.PluginUtils 6 | 7 | /** 8 | * @author Dmitry Baev charlie@yandex-team.ru 9 | * Date: 06.02.15 10 | */ 11 | @Plugin.Name("graph") 12 | @Plugin.Priority(300) 13 | class GraphPlugin extends DefaultTabPlugin { 14 | 15 | @Plugin.Data 16 | AllureGraph graph = new AllureGraph(); 17 | 18 | @Override 19 | void process(AllureTestCase testCase) { 20 | use(PluginUtils) { 21 | graph.testCases.add(testCase.toInfo()); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /allure-report-data/src/main/resources/xsd/total-plugin.xsd: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/graph/styles.css: -------------------------------------------------------------------------------- 1 | @import "../../mixins.css"; 2 | 3 | .charts-grid { 4 | display: flex; 5 | flex-wrap: wrap; 6 | align-content: flex-start; 7 | overflow: auto; 8 | height: 100vh; 9 | padding-left: $gap-size; 10 | } 11 | 12 | .chart { 13 | padding-bottom: $gap-size; 14 | &__legend { 15 | position: absolute; 16 | top: 20%; 17 | right: 10%; 18 | } 19 | &__legend-icon { 20 | position: relative; 21 | top: -1px; 22 | border-radius: 3px; 23 | display: inline-block; 24 | vertical-align: middle; 25 | width: 20px; 26 | height: 16px; 27 | margin-right: 5px; 28 | @mixin status-bg; 29 | } 30 | } 31 | 32 | .graph-widget { 33 | &__chart { 34 | padding: 1em 0; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /allure-commandline/src/main/java/ru/yandex/qatools/allure/command/AllureVersion.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.command; 2 | 3 | import io.airlift.airline.Command; 4 | import org.slf4j.Logger; 5 | import org.slf4j.LoggerFactory; 6 | 7 | /** 8 | * @author Artem Eroshenko 9 | */ 10 | @Command(name = "version", description = "Display version") 11 | public class AllureVersion extends AbstractCommand { 12 | 13 | private static final Logger LOGGER = LoggerFactory.getLogger(ReportOpen.class); 14 | 15 | /** 16 | * {@inheritDoc} 17 | */ 18 | @Override 19 | protected void runUnsafe() { 20 | String toolVersion = getClass().getPackage().getImplementationVersion(); 21 | LOGGER.info(toolVersion); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/environment/environment-widget/EnvironmentWidget.hbs: -------------------------------------------------------------------------------- 1 |

2 | Environment 3 |

4 |
5 | {{#each items}} 6 |
7 |
8 | {{key}} 9 |
10 |
11 | {{linky value}} 12 |
13 |
14 | {{/each}} 15 | {{#if overLimit}} 16 | 17 |
Show all environment variables
18 |
19 | {{/if}} 20 |
21 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/defects/index.js: -------------------------------------------------------------------------------- 1 | import allurePlugins from '../../pluginApi'; 2 | import DefectsLayout from './DefectsLayout'; 3 | import DefectsWidget from './defects-widget/DefectsWidget'; 4 | 5 | allurePlugins.addTab('defects', { 6 | title: 'Defects', icon: 'fa fa-flag', 7 | route: 'defects(/:defectId)(/:testcaseId)(/:attachmentId)', 8 | onEnter: (...routeParams) => new DefectsLayout({routeParams}) 9 | }); 10 | allurePlugins.addWidget('defects', DefectsWidget); 11 | allurePlugins.addTranslation('en', require('./translations/en.json')); 12 | allurePlugins.addTranslation('zh', require('./translations/zh.json')); 13 | allurePlugins.addTranslation('ru', require('./translations/ru.json')); 14 | allurePlugins.addTranslation('ptbr', require('./translations/ptbr.json')); 15 | -------------------------------------------------------------------------------- /allure-report-face/src/components/steps/StepsView.hbs: -------------------------------------------------------------------------------- 1 |

Steps

2 |
3 |
4 | 5 | 6 | [{{time time.start}}] 7 | 8 | Test started 9 |
10 |
11 | {{> steps-list steps=steps baseUrl=baseUrl}} 12 |
13 |
14 | 15 | 16 | [{{time time.stop}}] 17 | 18 | Test finished with status: {{status}} 19 |
20 |
21 | {{#each attachments}} 22 | {{> ../../blocks/attachment-row/attachment-row . baseUrl=../baseUrl}} 23 | {{/each}} 24 | -------------------------------------------------------------------------------- /allure-report-face/src/components/tooltip/styles.css: -------------------------------------------------------------------------------- 1 | $tooltip-bg: rgba(50, 50, 50, 0.8); 2 | $tooltip-color: #fff; 3 | 4 | .tooltip { 5 | position: absolute; 6 | background: $tooltip-bg; 7 | color: $tooltip-color; 8 | text-align: center; 9 | padding: 0 8px; 10 | line-height: 24px; 11 | font-size: 12px; 12 | z-index: 5; 13 | &:before { 14 | content: ' '; 15 | position: absolute; 16 | border: 8px solid transparent; 17 | } 18 | &_position_right:before { 19 | border-right-color: $tooltip-bg; 20 | top: 4px; 21 | left: -16px; 22 | } 23 | &_position_bottom:before { 24 | border-bottom-color: $tooltip-bg; 25 | top: -16px; 26 | left: 50%; 27 | margin-left: -8px; 28 | } 29 | &_position_center { 30 | pointer-events: none; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /allure-report-plugin-api/src/main/java/ru/yandex/qatools/allure/data/plugins/WithResources.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.data.plugins; 2 | 3 | /** 4 | * Common interface for all plugins with some resources. You can pass resources 5 | * to the report by adding it to class path to ${yourPluginCanonicalClassName} folder. 6 | * These resources will be copied to plugins/${pluginName} folder and added to 7 | * plugins.json. Then plugins/${pluginName}/script.js will be loaded. 8 | * 9 | * @author Dmitry Baev charlie@yandex-team.ru 10 | * Date: 22.04.15 11 | * @see AbstractPlugin 12 | */ 13 | public interface WithResources { 14 | 15 | /** 16 | * Name for plugin. Name should be unique and contains only latin characters. 17 | */ 18 | String getName(); 19 | 20 | 21 | } 22 | -------------------------------------------------------------------------------- /allure-report-face/src/behaviors/TooltipBehavior.js: -------------------------------------------------------------------------------- 1 | import {Behavior} from 'backbone.marionette'; 2 | import TooltipView from '../components/tooltip/TooltipView'; 3 | import {escapeExpression as escape} from 'handlebars/runtime'; 4 | import {on} from '../decorators'; 5 | 6 | export default class TooltipBehavior extends Behavior { 7 | 8 | initialize() { 9 | this.tooltip = new TooltipView(this.options); 10 | } 11 | 12 | onDestroy() { 13 | this.tooltip.hide(); 14 | } 15 | 16 | @on('mouseenter [data-tooltip]') 17 | onTipHover(e) { 18 | const el = this.$(e.currentTarget); 19 | this.tooltip.show(escape(el.data('tooltip')), el); 20 | } 21 | 22 | @on('mouseleave [data-tooltip]') 23 | onTipLeave() { 24 | this.tooltip.hide(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/environment/environment-widget/EnvironmentWidget.js: -------------------------------------------------------------------------------- 1 | import {ItemView} from 'backbone.marionette'; 2 | import {on} from '../../../decorators'; 3 | import template from './EnvironmentWidget.hbs'; 4 | 5 | export default class EnvironmentWidget extends ItemView { 6 | template = template; 7 | 8 | initialize() { 9 | this.listLimit = 10; 10 | } 11 | 12 | @on('click .environment-widget__expand') 13 | onExpandClick() { 14 | this.listLimit = this.model.get('items').length; 15 | this.render(); 16 | } 17 | 18 | serializeData() { 19 | var items = this.model.get('items'); 20 | return { 21 | items: items.slice(0, this.listLimit), 22 | overLimit: items.length > this.listLimit 23 | }; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /allure-java-adaptor-api/src/main/java/ru/yandex/qatools/allure/events/StepCanceledEvent.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.events; 2 | 3 | import ru.yandex.qatools.allure.model.Status; 4 | import ru.yandex.qatools.allure.model.Step; 5 | 6 | /** 7 | * Using to change step status to {@link ru.yandex.qatools.allure.model.Status#CANCELED} 8 | * 9 | * @author Dmitry Baev charlie@yandex-team.ru 10 | * Date: 11.11.13 11 | */ 12 | public class StepCanceledEvent extends AbstractStepCanceledEvent { 13 | 14 | /** 15 | * Change specified step status to {@link ru.yandex.qatools.allure.model.Status#CANCELED} 16 | * 17 | * @param step which will be changed 18 | */ 19 | @Override 20 | public void process(Step step) { 21 | step.setStatus(Status.CANCELED); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /allure-report-face/src/components/widget-status/WidgetStatusView.hbs: -------------------------------------------------------------------------------- 1 |

2 | {{title}} 3 | {{totalCount}} items total 4 |

5 |
6 | {{#each items}} 7 | <{{../rowTag}} class="table__row" href="#{{../baseUrl}}/{{uid}}"> 8 |
{{title}}
9 |
10 | {{status-bar statistic}} 11 |
12 | 13 | {{/each}} 14 | {{#if (gt totalCount items.length)}} 15 | 16 |
17 | {{showAllText}} 18 |
19 |
20 | {{/if}} 21 |
22 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/report-stats/report-stats-widget/styles.css: -------------------------------------------------------------------------------- 1 | @import "../../../variables.css"; 2 | 3 | .report-stats-widget { 4 | margin-top: $gap-size; 5 | 6 | &__info { 7 | line-height: 1.3; 8 | position: relative; 9 | &:after { 10 | position: absolute; 11 | content: ' '; 12 | left: 0; 13 | right: 0; 14 | background: linear-gradient(to left, $app-nav-bg, color($app-nav-bg a(0))); 15 | transition: right 0.3s; 16 | } 17 | dt { 18 | color: $text-muted-color; 19 | } 20 | dd { 21 | margin-left: 0; 22 | margin-bottom: 0.5em; 23 | } 24 | } 25 | 26 | &__icon { 27 | font-size: 22px; 28 | line-height: 24px; 29 | vertical-align: middle; 30 | transition: top 0.3s ease-in; 31 | margin: 0 5px; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | [//]: # ( 2 | . Thank you so much for sending us a pull request! 3 | . 4 | . Make sure you have a clear name for your pull request. 5 | . The name should start with a capital letter and no dot is required in the end of the sentence. 6 | . To link the request with isses use the following notation: (fixes #123, fixes #321\) 7 | . 8 | . An example of good pull request names: 9 | . - Add Russian translation (fixes #123\) 10 | . - Add an ability to disable default plugins 11 | . - Support emoji in test descriptions 12 | ) 13 | 14 | ### Context 15 | [//]: # ( 16 | Describe the problem or feature in addition to a link to the issues 17 | ) 18 | 19 | #### Checklist 20 | - [ ] [Sign Allure CLA][cla] 21 | - [ ] Provide unit tests 22 | 23 | [cla]: https://cla-assistant.io/accept/allure-framework/allure2 24 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/report-stats/report-stats-widget/ReportStatsWidget.js: -------------------------------------------------------------------------------- 1 | import './styles.css'; 2 | import {ItemView} from 'backbone.marionette'; 3 | import template from './ReportStatsWidget.hbs'; 4 | import {onModel} from '../../../decorators'; 5 | import ReportWidgetModel from './ReportWidgetModel'; 6 | 7 | export default class ReportStatsWidget extends ItemView { 8 | template = template; 9 | 10 | constructor() { 11 | super({ 12 | model: new ReportWidgetModel() 13 | }); 14 | } 15 | 16 | initialize() { 17 | this.model.fetch(); 18 | } 19 | 20 | @onModel('change') 21 | render() { 22 | super.render(); 23 | } 24 | 25 | serializeData() { 26 | return { 27 | report: this.model.toJSON() 28 | }; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /allure-java-annotations/src/main/java/ru/yandex/qatools/allure/annotations/Issue.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.annotations; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Inherited; 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.RetentionPolicy; 8 | import java.lang.annotation.Target; 9 | 10 | /** 11 | * Use this annotation to link a single issue from issue tracker to test cases and test suites. Usage: 12 | *
13 |  * @Issue("MYPROJECT-1")
14 |  * public void myTest() {
15 |  *     ...
16 |  * }
17 |  * 
18 | */ 19 | @Documented 20 | @Inherited 21 | @Retention(RetentionPolicy.RUNTIME) 22 | @Target({ElementType.METHOD, ElementType.TYPE}) 23 | public @interface Issue { 24 | 25 | String value(); 26 | 27 | } 28 | -------------------------------------------------------------------------------- /allure-report-face/src/components/language-select/styles.css: -------------------------------------------------------------------------------- 1 | @import "../../variables.css"; 2 | 3 | .language-select { 4 | z-index: 1; 5 | &.popover { 6 | padding: 0; 7 | } 8 | &__menu { 9 | list-style-type: none; 10 | padding: 0; 11 | margin: 0; 12 | } 13 | &__item { 14 | padding: 0.5em 0.8em; 15 | border-bottom: 1px solid $border-color; 16 | cursor: pointer; 17 | &::before { 18 | content: ' '; 19 | display: inline-block; 20 | background: url(checkmark.svg) center no-repeat; 21 | background-size: contain; 22 | width: 0.8em; 23 | height: 0.8em; 24 | margin-right: 0.5em; 25 | visibility: hidden; 26 | } 27 | &_active::before { 28 | visibility: visible; 29 | } 30 | &:hover { 31 | background: $hover-color; 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /allure-java-adaptor-api/src/test/java/ru/yandex/qatools/allure/ChangeTestSuiteTitleEvent.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure; 2 | 3 | import ru.yandex.qatools.allure.events.TestSuiteEvent; 4 | import ru.yandex.qatools.allure.model.TestSuiteResult; 5 | 6 | /** 7 | * @author Dmitry Baev charlie@yandex-team.ru 8 | * Date: 15.12.13 9 | */ 10 | public class ChangeTestSuiteTitleEvent implements TestSuiteEvent { 11 | private String uid; 12 | private String title; 13 | 14 | public ChangeTestSuiteTitleEvent(String uid, String title) { 15 | this.uid = uid; 16 | this.title = title; 17 | } 18 | 19 | @Override 20 | public String getUid() { 21 | return uid; 22 | } 23 | 24 | @Override 25 | public void process(TestSuiteResult context) { 26 | context.setTitle(title); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /allure-model/src/test/java/ru/yandex/qatools/allure/config/AllureNamingUtilsTest.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.config; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.assertNotNull; 6 | import static org.junit.Assert.assertTrue; 7 | 8 | /** 9 | * @author Dmitry Baev charlie@yandex-team.ru 10 | * Date: 02.02.15 11 | */ 12 | public class AllureNamingUtilsTest { 13 | 14 | @Test(expected = IllegalStateException.class) 15 | public void initTest() throws Exception { 16 | new AllureNamingUtils(); 17 | } 18 | 19 | @Test 20 | public void shouldGenerateSuiteName() throws Exception { 21 | String name = AllureNamingUtils.generateTestSuiteFileName(); 22 | assertNotNull(name); 23 | assertTrue(name.matches(new AllureConfig().getTestSuiteFileRegex())); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /allure-java-annotations/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ru.yandex.qatools.allure 5 | allure-core 6 | 1.6-SNAPSHOT 7 | 8 | 4.0.0 9 | 10 | allure-java-annotations 11 | 12 | Allure Java Annotations 13 | 14 | 15 | 16 | ru.yandex.qatools.allure 17 | allure-model 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /allure-report-face/src/layouts/pane/PaneLayout.js: -------------------------------------------------------------------------------- 1 | import {Model} from 'backbone'; 2 | import AppLayout from '../../layouts/application/AppLayout'; 3 | import PaneSetView from '../../components/pane-set/PaneSetView'; 4 | import TestcasePanes from '../../util/TestcasePanes'; 5 | 6 | export default class PaneLayout extends AppLayout { 7 | 8 | initialize() { 9 | super.initialize(); 10 | this.state = new Model(); 11 | this.listenTo(this.state, 'change', this.onStateChange, this); 12 | } 13 | 14 | getContentView() { 15 | return new PaneSetView(); 16 | } 17 | 18 | onViewReady() { 19 | this.testcase = new TestcasePanes(this.state, this.content.currentView); 20 | this.onRouteUpdate(...this.options.routeParams); 21 | } 22 | 23 | onStateChange() {} 24 | 25 | onRouteUpdate() {} 26 | } 27 | -------------------------------------------------------------------------------- /allure-report-face/src/decorators/index.js: -------------------------------------------------------------------------------- 1 | export * from 'backbone-decorators'; 2 | 3 | export function protoprop(target, name, descriptor) { 4 | target[name] = descriptor.initializer(); 5 | } 6 | 7 | export function behavior(name, config = {}) { 8 | return function({prototype}) { 9 | prototype.behaviors = Object.assign({ 10 | [name]: config 11 | }, prototype.behaviors); 12 | }; 13 | } 14 | 15 | export function className(name) { 16 | return function(target) { 17 | target.prototype.className = name; 18 | }; 19 | } 20 | 21 | export function region(selector) { 22 | return function(target, name, descriptor) { 23 | delete descriptor.initializer; 24 | descriptor.writable = true; 25 | target.regions = Object.assign({ 26 | [name]: selector 27 | }, target.regions); 28 | }; 29 | } 30 | -------------------------------------------------------------------------------- /allure-java-adaptor-api/src/main/java/ru/yandex/qatools/allure/storages/TestCaseStorage.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.storages; 2 | 3 | import ru.yandex.qatools.allure.model.TestCaseResult; 4 | 5 | /** 6 | * Using to storage information about current testCase context 7 | * 8 | * @author Dmitry Baev charlie@yandex-team.ru 9 | * Date: 13.12.13 10 | *

11 | * @see ru.yandex.qatools.allure.Allure 12 | */ 13 | public class TestCaseStorage extends InheritableThreadLocal { 14 | 15 | /** 16 | * Returns the current thread's "initial value". Construct an new 17 | * {@link ru.yandex.qatools.allure.model.TestCaseResult} 18 | * 19 | * @return the initial value for this thread-local 20 | */ 21 | @Override 22 | protected TestCaseResult initialValue() { 23 | return new TestCaseResult(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /allure-report-face/src/components/status-toggle/styles.css: -------------------------------------------------------------------------------- 1 | @import "../../variables.css"; 2 | 3 | .status-toggle { 4 | &__button { 5 | white-space: nowrap; 6 | &::before { 7 | position: relative; 8 | top: -1px; 9 | margin-right: 0.3em; 10 | vertical-align: middle; 11 | content: ' '; 12 | display: inline-block; 13 | height: 1em; 14 | width: 1em; 15 | border-radius: 2px; 16 | 17 | } 18 | &_status_passed::before { 19 | background: $color-passed; 20 | } 21 | &_status_canceled::before { 22 | background: $color-canceled; 23 | } 24 | &_status_pending::before { 25 | background: $color-pending; 26 | } 27 | &_status_failed::before { 28 | background: $color-failed; 29 | } 30 | &_status_broken::before { 31 | background: $color-broken; 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /allure-report-data/src/main/java/ru/yandex/qatools/allure/data/io/AttachmentReader.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.data.io; 2 | 3 | import com.google.inject.Inject; 4 | import ru.yandex.qatools.allure.data.AttachmentInfo; 5 | import ru.yandex.qatools.allure.data.plugins.AttachmentsIndex; 6 | 7 | import java.util.Iterator; 8 | 9 | /** 10 | * @author Dmitry Baev charlie@yandex-team.ru 11 | * Date: 19.02.15 12 | */ 13 | public class AttachmentReader implements Reader { 14 | 15 | @Inject 16 | private AttachmentsIndex index; 17 | 18 | @Override 19 | public Iterator iterator() { 20 | return index.findAll().iterator(); 21 | } 22 | 23 | public AttachmentsIndex getIndex() { 24 | return index; 25 | } 26 | 27 | public void setIndex(AttachmentsIndex index) { 28 | this.index = index; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /allure-report-face/src/data/testcase/TestcaseModel.js: -------------------------------------------------------------------------------- 1 | import {findWhere} from 'underscore'; 2 | import {Model} from 'backbone'; 3 | 4 | export default class TestcaseModel extends Model { 5 | get idAttribute() { 6 | return 'uid'; 7 | } 8 | 9 | initialize() { 10 | this.on('sync', this.updateAttachments, this); 11 | } 12 | 13 | updateAttachments() { 14 | function collectAttachments(steps) { 15 | return steps.reduce((attachments, step) => { 16 | return attachments.concat(collectAttachments(step.steps), step.attachments); 17 | }, []); 18 | } 19 | this.allAttachments = collectAttachments(this.get('steps')).concat(this.get('attachments')); 20 | } 21 | 22 | getAttachment(uid) { 23 | return findWhere(this.allAttachments, {uid}); 24 | } 25 | 26 | url() { 27 | return `data/${this.id}-testcase.json`; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /allure-commons/src/test/java/ru/yandex/qatools/allure/commons/BadXmlCharacterFilterReaderTest.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.commons; 2 | 3 | import org.apache.commons.io.IOUtils; 4 | import org.junit.Test; 5 | 6 | import java.io.StringReader; 7 | 8 | import static org.junit.Assert.assertEquals; 9 | 10 | /** 11 | * @author Dmitry Baev charlie@yandex-team.ru 12 | * Date: 12.05.15 13 | */ 14 | public class BadXmlCharacterFilterReaderTest { 15 | 16 | public static final String PATTERN = "qwerty%sйцукен Ω≈ç√∫˜ß∂ƒ©˙œ∑´†¥%s1234567890&%s"; 17 | 18 | @Test 19 | public void shouldEscapeBadXmlCharacters() throws Exception { 20 | StringReader reader = new StringReader(String.format(PATTERN, "\u0014", "\u0011", "\u0018")); 21 | String escaped = IOUtils.toString(new BadXmlCharacterFilterReader(reader)); 22 | 23 | assertEquals(escaped, String.format(PATTERN, " ", " ", " ")); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /allure-junit-adaptor/src/test/java/ru/yandex/qatools/allure/junit/testdata/TestWithTimeoutAnnotation.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.junit.testdata; 2 | 3 | import org.junit.Test; 4 | import ru.yandex.qatools.allure.Allure; 5 | import ru.yandex.qatools.allure.events.TestCaseEvent; 6 | import ru.yandex.qatools.allure.model.Label; 7 | import ru.yandex.qatools.allure.model.TestCaseResult; 8 | 9 | /** 10 | * @author Dmitry Baev charlie@yandex-team.ru 11 | * Date: 28.01.15 12 | */ 13 | public class TestWithTimeoutAnnotation { 14 | 15 | public static final String NAME = "TestWithTimeoutRule#title"; 16 | 17 | @Test(timeout = 10000) 18 | public void someTest() throws Exception { 19 | Allure.LIFECYCLE.fire(new TestCaseEvent() { 20 | @Override 21 | public void process(TestCaseResult context) { 22 | context.setTitle(NAME); 23 | } 24 | }); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /allure-java-annotations/src/main/java/ru/yandex/qatools/allure/annotations/Severity.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.annotations; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Inherited; 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.RetentionPolicy; 8 | import java.lang.annotation.Target; 9 | 10 | import ru.yandex.qatools.allure.model.SeverityLevel; 11 | 12 | /** 13 | * Each test has severity level. You can change test case severity 14 | * label using this annotation. 15 | * 16 | * @author Dmitry Baev charlie@yandex-team.ru 17 | * Date: 10.24.13 18 | *

19 | * @see ru.yandex.qatools.allure.model.SeverityLevel 20 | */ 21 | @Documented 22 | @Inherited 23 | @Retention(RetentionPolicy.RUNTIME) 24 | @Target(ElementType.METHOD) 25 | public @interface Severity { 26 | 27 | SeverityLevel value(); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/defects/defects-widget/DefectsWidget.hbs: -------------------------------------------------------------------------------- 1 |

2 | Defects 3 | {{t 'defects.STATISTIC' postProcess='interval' count=totalCount}} {{t 'overview.TOTAL'}} 4 |

5 |
6 | {{#each items}} 7 | 8 |
9 | {{count}} 10 |
11 |
{{message}}
12 |
13 | {{/each}} 14 | {{#if (gt totalCount items.length)}} 15 | 16 |
{{t "defects.SHOW_ALL"}}
17 |
18 | {{/if}} 19 |
20 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/xunit/testsuites-list/suite-table-row.hbs: -------------------------------------------------------------------------------- 1 |
{{duration time.duration}}
2 |
3 | {{#if statistic.failed}} 4 | {{statistic.failed}} 5 | {{/if}} 6 |
7 |
8 | {{#if statistic.broken}} 9 | {{statistic.broken}} 10 | {{/if}} 11 |
12 |
13 | {{#if statistic.canceled}} 14 | {{statistic.canceled}} 15 | {{/if}} 16 |
17 |
18 | {{#if statistic.pending}} 19 | {{statistic.pending}} 20 | {{/if}} 21 |
22 |
23 | {{statistic.total}} 24 |
25 | -------------------------------------------------------------------------------- /allure-report-face/src/pluginApi.js: -------------------------------------------------------------------------------- 1 | import router from './router'; 2 | import App from './app'; 3 | import { addTranslation } from './util/translation'; 4 | 5 | class AllurePluginApi { 6 | tabs = []; 7 | testcaseBlocks = { 8 | before: [], 9 | after: [] 10 | }; 11 | widgets = {}; 12 | 13 | addTab(tabName, {title, icon, route, onEnter = App.tabNotFound} = {}) { 14 | title = title || tabName; 15 | this.tabs.push({tabName, title, icon}); 16 | router.route(route, tabName); 17 | router.on('route:'+tabName, App.showView(onEnter)); 18 | } 19 | 20 | addWidget(name, Widget) { 21 | this.widgets[name] = Widget; 22 | } 23 | 24 | addTranslation(lang, json) { 25 | addTranslation(lang, json); 26 | } 27 | 28 | addTestcaseBlock(view, {position}) { 29 | this.testcaseBlocks[position].push(view); 30 | } 31 | } 32 | 33 | export default new AllurePluginApi(); 34 | -------------------------------------------------------------------------------- /allure-junit-adaptor/src/test/java/ru/yandex/qatools/allure/junit/testdata/SimpleTestClass.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.junit.testdata; 2 | 3 | import org.junit.Ignore; 4 | import org.junit.Test; 5 | 6 | import static org.junit.Assert.fail; 7 | import static org.junit.Assume.assumeTrue; 8 | 9 | /** 10 | * @author Dmitry Baev charlie@yandex-team.ru 11 | * Date: 20.01.14 12 | */ 13 | public class SimpleTestClass { 14 | @Test 15 | public void passedTest() throws Exception { 16 | } 17 | 18 | @Test 19 | public void failedTest() throws Exception { 20 | fail(); 21 | } 22 | 23 | 24 | @Test 25 | public void skippedTest() throws Exception { 26 | assumeTrue(false); 27 | } 28 | 29 | @Test 30 | public void brokenTest() throws Exception { 31 | throw new Exception(); 32 | } 33 | 34 | @Ignore 35 | @Test 36 | public void ignoredTest() throws Exception { 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /allure-report-plugin-api/src/main/java/ru/yandex/qatools/allure/data/plugins/WithWidget.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.data.plugins; 2 | 3 | /** 4 | * You can add widget to allure report. Widgets are shown at overview 5 | * tab in the report. There are few supported types of widgets: 6 | * Key-value list, List with statistics, defects (message with status and count 7 | * of these messages) and chart. 8 | * 9 | * @author Dmitry Baev charlie@yandex-team.ru 10 | * Date: 22.04.15 11 | * @see ProcessPlugin 12 | * @see ru.yandex.qatools.allure.data.WidgetType 13 | */ 14 | public interface WithWidget { 15 | 16 | /** 17 | * Name for plugin. Name should be unique and contains only latin characters. 18 | */ 19 | String getName(); 20 | 21 | /** 22 | * Get plugin widget content. You must implement {@link ProcessPlugin} to collect 23 | * information from test results. 24 | */ 25 | Object getWidgetData(); 26 | } 27 | -------------------------------------------------------------------------------- /allure-report-face/test/bootstrap.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | 3 | //add extra modules root 4 | process.env.NODE_PATH = 'src'; 5 | module.constructor._initPaths(); 6 | 7 | //debug log 8 | global.dump = require('debug')('allure-face:test'); 9 | 10 | //jsdom 11 | const jsdom = require('jsdom').jsdom; 12 | global.document = jsdom('', { 13 | url: 'http://localhost' 14 | }); 15 | global.window = global.document.defaultView; 16 | global.window.localStorage = jasmine.createSpyObj('localStorage', ['getItem', 'setItem']); 17 | global.window.jQuery = require('jquery'); 18 | global.navigator = global.window.navigator; 19 | global.location = global.window.location; 20 | 21 | //jasmine addons 22 | global.joc = jasmine.objectContaining; 23 | global.jany = jasmine.any; 24 | require('jasmine-jquery'); 25 | 26 | //require hooks 27 | require('./handlebars-loader'); 28 | require.extensions['.css'] = function() {}; 29 | require('babel-core/register'); 30 | -------------------------------------------------------------------------------- /allure-java-adaptor-api/src/main/java/ru/yandex/qatools/allure/events/TestSuiteFinishedEvent.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.events; 2 | 3 | import ru.yandex.qatools.allure.model.TestSuiteResult; 4 | 5 | /** 6 | * Using to finish testSuite 7 | * 8 | * @author Dmitry Baev charlie@yandex-team.ru 9 | * Date: 11.11.13 10 | *

11 | * @see ru.yandex.qatools.allure.Allure 12 | */ 13 | public class TestSuiteFinishedEvent extends AbstractTestSuiteFinishedEvent { 14 | 15 | /** 16 | * Constructs an new event with specified uid 17 | * 18 | * @param uid initial uid 19 | */ 20 | public TestSuiteFinishedEvent(String uid) { 21 | setUid(uid); 22 | } 23 | 24 | /** 25 | * Sets testSuite finish time 26 | * 27 | * @param testSuite to change 28 | */ 29 | @Override 30 | public void process(TestSuiteResult testSuite) { 31 | testSuite.setStop(System.currentTimeMillis()); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/behaviors/behaviors-tree/styles.css: -------------------------------------------------------------------------------- 1 | @import "../../../variables.css"; 2 | 3 | .behaviors-list { 4 | &__title { 5 | flex: none; 6 | width: 30%; 7 | } 8 | &__total { 9 | flex: none; 10 | width: 100px; 11 | } 12 | &__feature-title { 13 | position: relative; 14 | &:before { 15 | content: ' '; 16 | display: inline-block; 17 | vertical-align: middle; 18 | transition: transform 0.1s; 19 | background: url(../../../components/steps/arrow.svg) center no-repeat; 20 | width: 14px; 21 | height: 14px; 22 | } 23 | } 24 | &__story { 25 | display: none; 26 | padding-left: calc(2 * $gap-size); 27 | } 28 | &__feature-row { 29 | cursor: pointer; 30 | } 31 | &__feature-row_expanded { 32 | .behaviors-list__feature-title:before { 33 | transform: rotate(90deg); 34 | } 35 | & ~ .behaviors-list__story { 36 | display: flex; 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /allure-junit-adaptor/src/test/java/ru/yandex/qatools/allure/junit/testdata/TestWithTimeoutRule.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.junit.testdata; 2 | 3 | import org.junit.Rule; 4 | import org.junit.Test; 5 | import org.junit.rules.Timeout; 6 | import ru.yandex.qatools.allure.Allure; 7 | import ru.yandex.qatools.allure.events.TestCaseEvent; 8 | import ru.yandex.qatools.allure.model.Label; 9 | import ru.yandex.qatools.allure.model.TestCaseResult; 10 | 11 | /** 12 | * @author Dmitry Baev charlie@yandex-team.ru 13 | * Date: 28.01.15 14 | */ 15 | public class TestWithTimeoutRule { 16 | 17 | @Rule 18 | public Timeout timeout = new Timeout(10000); 19 | 20 | @Test 21 | public void someTest() throws Exception { 22 | Allure.LIFECYCLE.fire(new TestCaseEvent() { 23 | @Override 24 | public void process(TestCaseResult context) { 25 | context.setTitle(TestWithTimeoutAnnotation.NAME); 26 | } 27 | }); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /allure-commandline/src/main/java/ru/yandex/qatools/allure/CommandProperties.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure; 2 | 3 | import ru.qatools.properties.DefaultValue; 4 | import ru.qatools.properties.Property; 5 | import ru.qatools.properties.Required; 6 | import ru.qatools.properties.Resource; 7 | 8 | import java.nio.file.Path; 9 | 10 | /** 11 | * @author Artem Eroshenko 12 | */ 13 | @Resource.Classpath({"command.properties"}) 14 | public interface CommandProperties { 15 | 16 | @Required 17 | @Property("os.name") 18 | String getOsName(); 19 | 20 | @Required 21 | @Property("java.home") 22 | Path getJavaHome(); 23 | 24 | @Required 25 | @Property("allure.home") 26 | Path getAllureHome(); 27 | 28 | @DefaultValue("allure.properties") 29 | @Property("allure.config") 30 | Path getAllureConfig(); 31 | 32 | @DefaultValue("-Xms128m") 33 | @Property("allure.bundle.javaOpts") 34 | String getBundleJavaOpts(); 35 | 36 | } 37 | -------------------------------------------------------------------------------- /allure-java-annotations/src/main/java/ru/yandex/qatools/allure/annotations/Issues.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.annotations; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Inherited; 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.RetentionPolicy; 8 | import java.lang.annotation.Target; 9 | 10 | /** 11 | * Use this annotation to link multiple issues from issue tracker to test cases and test suites. Usage: 12 | *

13 | *

14 |  * @Issues({
15 |  *     @Issue("MYPROJECT-1"),
16 |  *     @Issue("MYPROJECT-2")
17 |  * })
18 |  * public void myTest(){
19 |  *     ...
20 |  * }
21 |  * 
22 | * 23 | * @author Dmitry Baev charlie@yandex-team.ru 24 | * Date: 01.08.14 25 | */ 26 | @Documented 27 | @Inherited 28 | @Retention(RetentionPolicy.RUNTIME) 29 | @Target({ElementType.METHOD, ElementType.TYPE}) 30 | public @interface Issues { 31 | 32 | Issue[] value(); 33 | 34 | } 35 | -------------------------------------------------------------------------------- /allure-model/src/test/resources/allure-results/d3df6bc4-475d-436b-b99f-3a4eaba6d1a7-testsuite.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | my.company.AllureMigrationTest 4 | 5 | 6 | AllureOldDataTest 7 | Test what do nothing and always passed right, but have a very long title, over 100 symbols, seriously 8 | I hate descriptions! See the title! 9 | 10 | 11 | 12 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /allure-commandline/src/main/java/ru/yandex/qatools/allure/command/ReportClean.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.command; 2 | 3 | import io.airlift.airline.Command; 4 | import org.slf4j.Logger; 5 | import org.slf4j.LoggerFactory; 6 | import ru.yandex.qatools.allure.utils.DeleteVisitor; 7 | 8 | import java.nio.file.Files; 9 | import java.nio.file.Path; 10 | 11 | /** 12 | * @author Artem Eroshenko 13 | */ 14 | @Command(name = "clean", description = "Clean report") 15 | public class ReportClean extends ReportCommand { 16 | 17 | private static final Logger LOGGER = LoggerFactory.getLogger(ReportClean.class); 18 | 19 | /** 20 | * Remove the report directory. 21 | */ 22 | @Override 23 | protected void runUnsafe() throws Exception { 24 | Path reportDirectory = getReportDirectoryPath(); 25 | Files.walkFileTree(reportDirectory, new DeleteVisitor()); 26 | LOGGER.info("Report directory <{}> was successfully cleaned.", reportDirectory); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /allure-java-annotations/src/main/java/ru/yandex/qatools/allure/annotations/Step.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.annotations; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * In order to define steps you need to annotate respective methods 11 | * with @Step annotation. When not specified step name equals to 12 | * annotated method name converted to human readable format. To 13 | * define explicit step name: 14 | *
15 |  * @Step("Open '{0}' page.")
16 |  * public void openPageByAddress(String pageAddress) {
17 |  *     ...
18 |  * }
19 |  * 
20 | * 21 | * @author Dmitry Baev charlie@yandex-team.ru 22 | * Date: 10.24.13 23 | */ 24 | @Documented 25 | @Retention(RetentionPolicy.RUNTIME) 26 | @Target(ElementType.METHOD) 27 | public @interface Step { 28 | 29 | String value() default ""; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /allure-report-data/src/main/java/ru/yandex/qatools/allure/data/ReportGenerationException.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.data; 2 | 3 | /** 4 | * @author Dmitry Baev charlie@yandex-team.ru 5 | * Date: 22.10.13 6 | *

7 | * Signals that an attempt to generate the report in specified directory has failed. 8 | */ 9 | public class ReportGenerationException extends RuntimeException { 10 | 11 | /** 12 | * Constructs the {@link ru.yandex.qatools.allure.data.ReportGenerationException} from given cause 13 | * 14 | * @param cause given {@link java.lang.Throwable} cause 15 | */ 16 | public ReportGenerationException(Throwable cause) { 17 | super(cause); 18 | } 19 | 20 | /** 21 | * Constructs the {@link ru.yandex.qatools.allure.data.ReportGenerationException} with specified detail message 22 | * 23 | * @param message the detail message. 24 | */ 25 | public ReportGenerationException(String message) { 26 | super(message); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /allure-java-annotations/src/main/java/ru/yandex/qatools/allure/annotations/Features.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.annotations; 2 | 3 | import java.lang.annotation.*; 4 | 5 | /** 6 | * In order to group your tests by features simply annotate test suite 7 | * or test case with {@link ru.yandex.qatools.allure.annotations.Features} 8 | * annotation. This annotation can take either one string or a string 9 | * array because one test case can relate to several features: 10 | *

11 | *

12 |  * @Features({"Feature1", "Feature2"})
13 |  * @Test
14 |  * public void myTest() {
15 |  *     ...
16 |  * }
17 |  *
18 |  * @Features("Feature")
19 |  * @Test
20 |  * public void myTest() {
21 |  *     ...
22 |  * }
23 |  * 
24 | * @author Dmitry Baev charlie@yandex-team.ru 25 | * Date: 25.12.13 26 | */ 27 | @Documented 28 | @Inherited 29 | @Retention(RetentionPolicy.RUNTIME) 30 | @Target({ElementType.METHOD, ElementType.TYPE}) 31 | public @interface Features { 32 | 33 | String[] value(); 34 | 35 | } 36 | -------------------------------------------------------------------------------- /allure-report-face/src/data/settings/SettingsModel.js: -------------------------------------------------------------------------------- 1 | import {Model} from 'backbone'; 2 | import {protoprop} from '../../decorators'; 3 | 4 | export default class SettingsModel extends Model { 5 | @protoprop 6 | defaults = { 7 | language: 'en', 8 | testCaseSorting: { 9 | field: 'index', 10 | order: 'asc' 11 | }, 12 | sidebarCollapsed: false, 13 | visibleStatuses: { 14 | failed: true, 15 | broken: true, 16 | canceled: true, 17 | pending: true, 18 | passed: true 19 | } 20 | }; 21 | 22 | fetch() { 23 | return new Promise(resolve => { 24 | const settings = window.localStorage.getItem('allureSettings'); 25 | this.set(JSON.parse(settings)); 26 | resolve(); 27 | }); 28 | } 29 | 30 | save(key, val) { 31 | this.set(key, val); 32 | const json = this.toJSON(); 33 | window.localStorage.setItem('allureSettings', JSON.stringify(json)); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /allure-commandline/src/main/java/ru/yandex/qatools/allure/command/ReportCommand.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.command; 2 | 3 | import io.airlift.airline.Option; 4 | import io.airlift.airline.OptionType; 5 | 6 | import java.nio.file.Path; 7 | import java.nio.file.Paths; 8 | 9 | /** 10 | * @author Artem Eroshenko 11 | */ 12 | public abstract class ReportCommand extends AbstractCommand { 13 | 14 | @Option(name = {"-o", "--report-dir", "--output"}, type = OptionType.COMMAND, 15 | description = "The directory to generate Allure report into.") 16 | protected String reportDirectory = "allure-report"; 17 | 18 | /** 19 | * The string representation of path to the report directory. 20 | */ 21 | protected String getReportDirectory() { 22 | return reportDirectory; 23 | } 24 | 25 | /** 26 | * The path to the report directory {@link #getReportDirectory()}. 27 | */ 28 | protected Path getReportDirectoryPath() { 29 | return Paths.get(getReportDirectory()); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /allure-report-face/src/components/steps/styles.css: -------------------------------------------------------------------------------- 1 | @import "../../variables.css"; 2 | 3 | .steps { 4 | &__title { 5 | margin: $gap-size $gap-size 0.3em; 6 | } 7 | } 8 | 9 | .step { 10 | line-height: 1.5; 11 | &__arrow { 12 | left: 7px; 13 | top: 10px; 14 | position: absolute; 15 | visibility: hidden; 16 | width: 14px; 17 | height: 14px; 18 | background: url(arrow.svg) center no-repeat; 19 | transition: transform 0.1s; 20 | .step__title_has-content > & { 21 | visibility: visible; 22 | } 23 | } 24 | &__title { 25 | position: relative; 26 | padding: 7px $gap-size 7px 25px; 27 | cursor: pointer; 28 | } 29 | &__time { 30 | color: $text-muted-color 31 | } 32 | &__content { 33 | margin-left: 30px; 34 | display: none; 35 | } 36 | &:hover { 37 | & > .step__title { 38 | background: $hover-color; 39 | } 40 | } 41 | &__title_expanded .step__arrow { 42 | transform: rotate(90deg); 43 | } 44 | &__title_expanded + &__content { 45 | display: block; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /allure-java-adaptor-api/src/test/java/ru/yandex/qatools/allure/experimental/ListenersNotifierSPITest.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.experimental; 2 | 3 | import org.junit.Before; 4 | import org.junit.Test; 5 | 6 | import java.net.URL; 7 | import java.net.URLClassLoader; 8 | 9 | import static org.hamcrest.Matchers.hasSize; 10 | import static org.junit.Assert.assertThat; 11 | 12 | /** 13 | * @author Dmitry Baev charlie@yandex-team.ru 14 | * Date: 04.06.14 15 | */ 16 | public class ListenersNotifierSPITest { 17 | 18 | private ListenersNotifier notifier; 19 | 20 | @Before 21 | public void setUp() throws Exception { 22 | URL url = getClass().getClassLoader().getResource("testdata/"); 23 | URLClassLoader classLoader = new URLClassLoader(new URL[]{url}, Thread.currentThread().getContextClassLoader()); 24 | 25 | notifier = new ListenersNotifier(classLoader); 26 | } 27 | 28 | @Test 29 | public void listenersCountTest() throws Exception { 30 | assertThat(notifier.getListeners(), hasSize(1)); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /allure-report-plugin-api/src/main/resources/xsd/widgets.xsd: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /allure-testng-adaptor/src/test/java/ru/yandex/qatools/allure/testng/testdata/GroupTest.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.testng.testdata; 2 | 3 | import static org.hamcrest.CoreMatchers.*; 4 | import static org.junit.Assert.*; 5 | import static org.testng.Assert.fail; 6 | 7 | import org.testng.annotations.*; 8 | 9 | public class GroupTest { 10 | 11 | @Test 12 | public void activeTest() { } 13 | 14 | @Test(enabled = false) 15 | public void inactiveTest() { } 16 | 17 | @Test(groups = "include") 18 | public void activeIncludedTest() { } 19 | 20 | @Test(groups = "include", enabled = false) 21 | public void inactiveIncludedTest() { } 22 | 23 | @Test(groups = "exclude") 24 | public void activeExcludedTest() { } 25 | 26 | @Test(groups = "exclude", enabled = false) 27 | public void inactiveExcludedTest() { } 28 | 29 | @Test(groups = {"include", "exclude"}) 30 | public void activeIncludedExcludedTest() { } 31 | 32 | @Test(groups = {"include", "exclude"}, enabled = false) 33 | public void inactiveIncludedExcludedTest() { } 34 | } 35 | -------------------------------------------------------------------------------- /allure-java-annotations/src/main/java/ru/yandex/qatools/allure/annotations/Description.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.annotations; 2 | 3 | import ru.yandex.qatools.allure.model.DescriptionType; 4 | 5 | import java.lang.annotation.Documented; 6 | import java.lang.annotation.ElementType; 7 | import java.lang.annotation.Retention; 8 | import java.lang.annotation.RetentionPolicy; 9 | import java.lang.annotation.Target; 10 | 11 | /** 12 | * Using this annotation you can add some text description 13 | * to test suite or test case. 14 | *
15 |  * @Test
16 |  * @Description("This is an example of my test")
17 |  * public void myTest() throws Exception {
18 |  *      ...
19 |  * }
20 |  * 
21 | * @author Dmitry Baev charlie@yandex-team.ru 22 | * Date: 10.24.13 23 | * @see ru.yandex.qatools.allure.model.DescriptionType 24 | */ 25 | @Documented 26 | @Retention(RetentionPolicy.RUNTIME) 27 | @Target({ElementType.METHOD, ElementType.TYPE}) 28 | public @interface Description { 29 | 30 | String value(); 31 | 32 | DescriptionType type() default DescriptionType.TEXT; 33 | 34 | } 35 | -------------------------------------------------------------------------------- /allure-report-face/src/components/attachment/styles.css: -------------------------------------------------------------------------------- 1 | @import "../../variables.css"; 2 | 3 | .attachment { 4 | display: flex; 5 | flex-direction: column; 6 | height: 100%; 7 | &__title { 8 | flex-shrink: 0; 9 | } 10 | &__filename { 11 | background: $heading-bg; 12 | padding: $gap-size; 13 | } 14 | &__code { 15 | font: 14px normal "Courier New" monospace; 16 | white-space: pre-wrap; 17 | word-break: break-word; 18 | margin: 0; 19 | padding: 0; 20 | } 21 | &__table { 22 | width: 100%; 23 | tr { 24 | border-bottom: 1px solid $border-color; 25 | } 26 | td { 27 | padding: 10px 15px; 28 | } 29 | } 30 | &__url { 31 | padding: 0 $gap-size; 32 | margin: 0.5em 0; 33 | &_comment { 34 | color: $text-muted-color; 35 | } 36 | } 37 | &__embed, &__media { 38 | max-width: 100%; 39 | } 40 | &__iframe { 41 | width: 100%; 42 | flex: 1; 43 | } 44 | &__media-container { 45 | text-align: center; 46 | cursor: zoom-in; 47 | .pane_expanded & { 48 | cursor: zoom-out; 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /allure-report-plugin-api/src/main/java/ru/yandex/qatools/allure/data/Widgets.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.data; 2 | 3 | import javax.xml.bind.annotation.XmlAccessType; 4 | import javax.xml.bind.annotation.XmlAccessorType; 5 | import javax.xml.bind.annotation.XmlElement; 6 | import javax.xml.bind.annotation.XmlElementWrapper; 7 | import javax.xml.bind.annotation.XmlType; 8 | import java.util.Map; 9 | 10 | @XmlAccessorType(XmlAccessType.FIELD) 11 | @XmlType(name = "widgets", propOrder = { 12 | 13 | }) 14 | public class Widgets { 15 | 16 | @XmlElement(required = true) 17 | protected String hash; 18 | 19 | @XmlElementWrapper(name = "plugins", required = true) 20 | @XmlElement(name = "plugin") 21 | protected Map plugins; 22 | 23 | public String getHash() { 24 | return hash; 25 | } 26 | 27 | public void setHash(String hash) { 28 | this.hash = hash; 29 | } 30 | 31 | public Map getPlugins() { 32 | return plugins; 33 | } 34 | 35 | public void setPlugins(Map plugins) { 36 | this.plugins = plugins; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /allure-report-face/src/layouts/application/AppLayout.js: -------------------------------------------------------------------------------- 1 | import './styles.css'; 2 | import { LayoutView } from 'backbone.marionette'; 3 | import { region, className } from '../../decorators'; 4 | import template from './AppLayout.hbs'; 5 | import SideNav from '../../components/side-nav/SideNavView'; 6 | 7 | @className('app') 8 | class AppLayout extends LayoutView { 9 | template = template; 10 | 11 | @region('.app__content') 12 | content; 13 | @region('.app__nav') 14 | nav; 15 | 16 | initialize() {} 17 | 18 | onRender() { 19 | this.nav.show(new SideNav()); 20 | const dataPromise = this.loadData(); 21 | if(dataPromise) { 22 | dataPromise.then(() => { 23 | this.content.show(this.getContentView()); 24 | this.onViewReady(); 25 | }); 26 | } else { 27 | this.content.show(this.getContentView()); 28 | } 29 | } 30 | 31 | onViewReady() {} 32 | 33 | loadData() {} 34 | 35 | getContentView() { 36 | throw new Error('attempt to call abstract method'); 37 | } 38 | } 39 | 40 | export default AppLayout; 41 | -------------------------------------------------------------------------------- /allure-report-data/src/main/groovy/ru/yandex/qatools/allure/data/plugins/TotalPlugin.groovy: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.data.plugins 2 | 3 | import ru.yandex.qatools.allure.data.AllureTestCase 4 | import ru.yandex.qatools.allure.data.AllureTotal 5 | import ru.yandex.qatools.allure.data.Statistic 6 | import ru.yandex.qatools.allure.data.Time 7 | import ru.yandex.qatools.allure.data.utils.PluginUtils 8 | 9 | /** 10 | * @author Dmitry Baev charlie@yandex-team.ru 11 | * Date: 14.08.15 12 | */ 13 | @Plugin.Name("total") 14 | @Plugin.Priority(700) 15 | class TotalPlugin extends DefaultTabPlugin implements WithWidget { 16 | 17 | @Plugin.Data 18 | AllureTotal total = new AllureTotal( 19 | statistic: new Statistic(), 20 | time: new Time(start: Long.MAX_VALUE, stop: Long.MIN_VALUE) 21 | ) 22 | 23 | @Override 24 | void process(AllureTestCase testCase) { 25 | use(PluginUtils) { 26 | total.statistic.update(testCase.status) 27 | total.time.update(testCase.time) 28 | } 29 | } 30 | 31 | @Override 32 | Object getWidgetData() { 33 | total 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /allure-model/src/main/resources/environment.xsd: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /allure-commandline/src/main/java/ru/yandex/qatools/allure/utils/DeleteVisitor.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.utils; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | 6 | import java.io.IOException; 7 | import java.nio.file.FileVisitResult; 8 | import java.nio.file.Files; 9 | import java.nio.file.Path; 10 | import java.nio.file.SimpleFileVisitor; 11 | import java.nio.file.attribute.BasicFileAttributes; 12 | 13 | /** 14 | * The visitor deletes files and directories. 15 | */ 16 | public class DeleteVisitor extends SimpleFileVisitor { 17 | 18 | private static final Logger LOGGER = LoggerFactory.getLogger(DeleteVisitor.class); 19 | 20 | @Override 21 | public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { 22 | Files.delete(file); 23 | LOGGER.debug("Delete <{}>", file); 24 | return FileVisitResult.CONTINUE; 25 | } 26 | 27 | @Override 28 | public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException { 29 | Files.delete(dir); 30 | LOGGER.debug("Delete <{}>", dir); 31 | return FileVisitResult.CONTINUE; 32 | } 33 | } -------------------------------------------------------------------------------- /allure-report-data/src/test/groovy/ru/yandex/qatools/allure/data/plugins/DefaultPluginLoaderTest.groovy: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.data.plugins 2 | 3 | import org.junit.Before 4 | import org.junit.Test 5 | 6 | /** 7 | * @author Dmitry Baev charlie@yandex-team.ru 8 | * Date: 07.02.15 9 | */ 10 | class DefaultPluginLoaderTest { 11 | 12 | PluginLoader pluginLoader 13 | 14 | @Before 15 | void setUp() { 16 | URL url = getClass().classLoader.getResource("testdata/") 17 | URLClassLoader classLoader = new URLClassLoader( 18 | [url] as URL[], getClass().classLoader 19 | ) 20 | pluginLoader = new DefaultPluginLoader(classLoader, null) 21 | } 22 | 23 | @Test 24 | void shouldLoadPlugins() { 25 | def plugins = pluginLoader.loadPlugins() 26 | assert plugins 27 | assert plugins.collect { it.class.canonicalName }.containsAll([ 28 | "ru.yandex.qatools.allure.data.testdata.SomePlugin", 29 | "ru.yandex.qatools.allure.data.testdata.SomePreparePlugin", 30 | "ru.yandex.qatools.allure.data.testdata.SomeProcessPlugin" 31 | ]) 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /allure-java-adaptor-api/src/test/java/ru/yandex/qatools/allure/utils/testdata/SimpleClass.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.utils.testdata; 2 | 3 | import ru.yandex.qatools.allure.annotations.*; 4 | import ru.yandex.qatools.allure.model.SeverityLevel; 5 | 6 | /** 7 | * @author Dmitry Baev charlie@yandex-team.ru 8 | * Date: 14.12.13 9 | */ 10 | 11 | @Title("default.title") 12 | @Description("default.description") 13 | @Features("default.feature") 14 | @Stories("default.story") 15 | @Issue("default.issue") 16 | public class SimpleClass { 17 | 18 | @Title("some.title") 19 | @Description("some.description") 20 | @Severity(SeverityLevel.BLOCKER) 21 | @Features("some.feature") 22 | @Stories("some.story") 23 | @Issue("some.simple.issue") 24 | @Issues({ 25 | @Issue("some.nested.issue.1"), 26 | @Issue("some.nested.issue.2") 27 | }) 28 | @TestCaseId("test.case.id") 29 | public void simpleMethod() { 30 | } 31 | 32 | public void defaultMethod(){ 33 | } 34 | 35 | @Severity(SeverityLevel.CRITICAL) 36 | @Issue("initial.issue") 37 | public void combinedMethod(){ 38 | } 39 | 40 | 41 | } 42 | -------------------------------------------------------------------------------- /allure-junit-adaptor/src/test/java/ru/yandex/qatools/allure/junit/BasicListenerTest.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.junit; 2 | 3 | import org.junit.After; 4 | import org.junit.Before; 5 | import org.junit.Rule; 6 | import org.junit.rules.TemporaryFolder; 7 | import org.junit.runner.JUnitCore; 8 | import ru.yandex.qatools.allure.utils.AllureResultsUtils; 9 | 10 | import java.io.File; 11 | 12 | /** 13 | * @author Dmitry Baev charlie@yandex-team.ru 14 | * Date: 28.01.15 15 | */ 16 | public abstract class BasicListenerTest { 17 | 18 | @Rule 19 | public TemporaryFolder folder = new TemporaryFolder(); 20 | 21 | public File resultsDirectory; 22 | 23 | @Before 24 | public void setUp() throws Exception { 25 | resultsDirectory = folder.newFolder(); 26 | AllureResultsUtils.setResultsDirectory(resultsDirectory); 27 | 28 | JUnitCore core = new JUnitCore(); 29 | core.addListener(new AllureRunListener()); 30 | core.run(getTestClass()); 31 | } 32 | 33 | @After 34 | public void tearDown() { 35 | AllureResultsUtils.setResultsDirectory(null); 36 | } 37 | 38 | public abstract Class getTestClass(); 39 | } 40 | -------------------------------------------------------------------------------- /allure-report-data/src/main/groovy/ru/yandex/qatools/allure/data/plugins/MigrationPlugin.groovy: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.data.plugins 2 | 3 | import ru.yandex.qatools.allure.model.Status 4 | import ru.yandex.qatools.allure.model.TestCaseResult 5 | 6 | import static ru.yandex.qatools.allure.config.AllureModelUtils.createSeverityLabel 7 | 8 | /** 9 | * eroshenkoam 10 | * 25/02/15 11 | */ 12 | class MigrationPlugin implements PreparePlugin { 13 | 14 | @Override 15 | void prepare(TestCaseResult data) { 16 | migrateSeverityFieldToLabel(data) 17 | migrateSkippedStatusToCanceled(data) 18 | } 19 | 20 | @Override 21 | Class getType() { 22 | TestCaseResult 23 | } 24 | 25 | static void migrateSkippedStatusToCanceled(TestCaseResult data) { 26 | if (data.status.equals(Status.SKIPPED)) { 27 | data.status = Status.CANCELED; 28 | } 29 | } 30 | 31 | static void migrateSeverityFieldToLabel(TestCaseResult data) { 32 | if (data.severity) { 33 | data.labels.add(createSeverityLabel(data.severity)) 34 | data.severity = null 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /allure-report-data/src/test/groovy/ru/yandex/qatools/allure/data/plugins/MigrationPluginTest.groovy: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.data.plugins 2 | 3 | import org.junit.Test 4 | import ru.yandex.qatools.allure.config.AllureModelUtils 5 | import ru.yandex.qatools.allure.model.SeverityLevel 6 | import ru.yandex.qatools.allure.model.Status 7 | import ru.yandex.qatools.allure.model.TestCaseResult 8 | 9 | /** 10 | * eroshenkoam 11 | * 25/02/15 12 | */ 13 | class MigrationPluginTest { 14 | 15 | def plugin = new MigrationPlugin() 16 | 17 | def severity = SeverityLevel.CRITICAL 18 | 19 | @Test 20 | void severityFieldMustBeMigratedToLabels() { 21 | 22 | def testCase = new TestCaseResult(severity: severity) 23 | plugin.prepare(testCase) 24 | 25 | assert testCase.labels.contains(AllureModelUtils.createSeverityLabel(severity)) 26 | assert testCase.severity == null 27 | 28 | } 29 | 30 | @Test 31 | void skippedStatusMustBeMigratedToCanceled () { 32 | 33 | def testCase = new TestCaseResult(status: Status.SKIPPED) 34 | plugin.prepare(testCase) 35 | 36 | assert testCase.status == Status.CANCELED 37 | 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /allure-java-aspects/src/test/java/ru/yandex/qatools/allure/aspects/testdata/MySteps.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.aspects.testdata; 2 | 3 | import ru.yandex.qatools.allure.annotations.Attachment; 4 | import ru.yandex.qatools.allure.annotations.Step; 5 | 6 | /** 7 | * @author Dmitry Baev charlie@yandex-team.ru 8 | * Date: 08.12.14 9 | */ 10 | public class MySteps { 11 | 12 | @Step 13 | public void sampleStep() { 14 | } 15 | 16 | @Step 17 | public static void sampleStaticStep() { 18 | } 19 | 20 | @Step 21 | public void failedStep(Exception throwable) throws Exception { 22 | throw throwable; 23 | } 24 | 25 | @Step("Tata title") 26 | public void stepWithTitle() { 27 | } 28 | 29 | @Attachment 30 | public byte[] byteAttachment(byte[] attachment) { 31 | return attachment; 32 | } 33 | 34 | @Attachment(type = "super-type", value = "super-title") 35 | public String stringAttachment(String attachment) { 36 | return attachment; 37 | } 38 | 39 | @Attachment("{method}: {0}") 40 | public String stringAttachment(String message, String attachment) { 41 | return attachment; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /allure-report-data/src/test/groovy/ru/yandex/qatools/allure/data/utils/PluginUtilsTest.groovy: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.data.utils 2 | 3 | import org.junit.Test 4 | import ru.yandex.qatools.allure.data.Statistic 5 | 6 | /** 7 | * @author Dmitry Baev charlie@yandex-team.ru 8 | * Date: 05.02.16 9 | */ 10 | class PluginUtilsTest { 11 | 12 | @Test 13 | void shouldCompareStatistics() { 14 | Statistic first = new Statistic(failed: 1, broken: 2, canceled: 3, passed: 4, pending: 5, total: 15) 15 | Statistic second = new Statistic(failed: 5, broken: 2, canceled: 4, passed: 1, pending: 3, total: 15) 16 | Statistic third = new Statistic(failed: 5, broken: 2, canceled: 2, passed: 2, pending: 2, total: 13) 17 | 18 | use(PluginUtils) { 19 | assert first.cmp(first) == 0 20 | assert first.cmp(second) < 0 21 | assert first.cmp(third) < 0 22 | 23 | assert second.cmp(first) > 0 24 | assert second.cmp(second) == 0 25 | assert second.cmp(third) > 0 26 | 27 | assert third.cmp(first) > 0 28 | assert third.cmp(second) < 0 29 | assert third.cmp(third) == 0 30 | } 31 | 32 | } 33 | } -------------------------------------------------------------------------------- /allure-java-adaptor-api/src/test/java/ru/yandex/qatools/allure/storages/TestSuiteStorageTest.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.storages; 2 | 3 | import org.junit.Before; 4 | import org.junit.Test; 5 | import ru.yandex.qatools.allure.model.TestSuiteResult; 6 | 7 | import static org.junit.Assert.*; 8 | 9 | /** 10 | * @author Dmitry Baev charlie@yandex-team.ru 11 | * Date: 14.12.13 12 | */ 13 | public class TestSuiteStorageTest { 14 | 15 | private TestSuiteStorage testSuiteStorage; 16 | 17 | @Before 18 | public void setUp() throws Exception { 19 | testSuiteStorage = new TestSuiteStorage(); 20 | } 21 | 22 | @Test 23 | public void getTest() throws Exception { 24 | TestSuiteResult testSuite = testSuiteStorage.get("a"); 25 | assertTrue(testSuite == testSuiteStorage.get("a")); 26 | assertFalse(testSuite == testSuiteStorage.get("b")); 27 | } 28 | 29 | @Test 30 | public void removeTest() throws Exception { 31 | TestSuiteResult testSuite = testSuiteStorage.get("a"); 32 | assertTrue(testSuite == testSuiteStorage.get("a")); 33 | testSuiteStorage.remove("a"); 34 | assertFalse(testSuite == testSuiteStorage.get("a")); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /allure-java-annotations/src/main/java/ru/yandex/qatools/allure/annotations/Stories.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.annotations; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Inherited; 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.RetentionPolicy; 8 | import java.lang.annotation.Target; 9 | 10 | /** 11 | * In order to group your tests by stories simply annotate test suite 12 | * or test case with {@link ru.yandex.qatools.allure.annotations.Stories} 13 | * annotation. This annotation can take either one string or a string 14 | * array because one test case can relate to several stories: 15 | *
16 |  * @Stories({"Story1", "Story2"})
17 |  * @Test
18 |  * public void myTest() {
19 |  *     ...
20 |  * }
21 |  *
22 |  * @Stories("Story")
23 |  * @Test
24 |  * public void myTest() {
25 |  *     ...
26 |  * }
27 |  * 
28 | * @author Dmitry Baev charlie@yandex-team.ru 29 | * Date: 25.12.13 30 | */ 31 | @Documented 32 | @Inherited 33 | @Retention(RetentionPolicy.RUNTIME) 34 | @Target({ElementType.METHOD, ElementType.TYPE}) 35 | public @interface Stories { 36 | 37 | String[] value(); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /allure-testng-adaptor/src/test/java/ru/yandex/qatools/allure/testng/AllureTestUtils.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.testng; 2 | 3 | import static java.nio.file.FileVisitResult.CONTINUE; 4 | 5 | import java.io.IOException; 6 | import java.nio.file.FileVisitResult; 7 | import java.nio.file.Files; 8 | import java.nio.file.Path; 9 | import java.nio.file.SimpleFileVisitor; 10 | import java.nio.file.attribute.BasicFileAttributes; 11 | 12 | public class AllureTestUtils { 13 | 14 | public static void deleteNotEmptyDirectory(Path path) throws IOException { 15 | Files.walkFileTree(path, new SimpleFileVisitor() { 16 | @Override 17 | public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { 18 | Files.delete(file); 19 | return CONTINUE; 20 | } 21 | 22 | @Override 23 | public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException { 24 | if (exc == null) { 25 | Files.delete(dir); 26 | return CONTINUE; 27 | } else { 28 | throw exc; 29 | } 30 | } 31 | }); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /allure-report-face/src/components/steps/steps-list.hbs: -------------------------------------------------------------------------------- 1 | {{#each steps}} 2 |
3 |
4 | 5 | 6 | [{{time time.start}}] 7 | 8 | {{title}} 9 | {{#if (eq status "FAILED")}} 10 | 11 | {{/if}} 12 | {{#if (eq status "BROKEN")}} 13 | 14 | {{/if}} 15 | {{#if (eq status "SKIPPED")}} 16 | 17 | {{/if}} 18 |
19 |
20 | {{> steps-list steps=steps baseUrl=../baseUrl}} 21 | {{#each attachments}} 22 | {{> ../../blocks/attachment-row/attachment-row . baseUrl=../baseUrl}} 23 | {{/each}} 24 |
25 |
26 | {{/each}} 27 | -------------------------------------------------------------------------------- /allure-report-plugin-api/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | allure-core 5 | ru.yandex.qatools.allure 6 | 1.6-SNAPSHOT 7 | 8 | 4.0.0 9 | 10 | allure-report-plugin-api 11 | 12 | Allure Report Plugin Api 13 | 14 | 15 | 16 | ru.yandex.qatools.allure 17 | allure-model 18 | 19 | 20 | com.google.inject 21 | guice 22 | 23 | 24 | 25 | 26 | 27 | 28 | org.jvnet.jaxb2.maven2 29 | maven-jaxb2-plugin 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /allure-report-face/src/router.spec.js: -------------------------------------------------------------------------------- 1 | /*eslint-env jasmine*/ 2 | import proxyquire from 'proxyquire'; 3 | import {history} from 'backbone'; 4 | 5 | const router = proxyquire('./router', {}); 6 | 7 | describe('router', function() { 8 | beforeEach(function() { 9 | history.start(); 10 | }); 11 | afterEach(function() { 12 | history.stop(); 13 | }); 14 | 15 | it('should transit to new route and trigger event', function() { 16 | router.to('404'); 17 | const onHome = jasmine.createSpy('onHome'); 18 | router.on('route:home', onHome); 19 | router.to(''); 20 | expect(onHome).toHaveBeenCalled(); 21 | }); 22 | 23 | it('should parse url params', function() { 24 | router.toUrl('project?tab=test'); 25 | expect(router.getUrlParams()).toEqual({tab: 'test'}); 26 | }); 27 | 28 | it('should update search query without route change', function() { 29 | router.toUrl('project?tab=test'); 30 | const onChange = jasmine.createSpy('onChange'); 31 | router.on('route', onChange); 32 | router.setSearch({tab: 'next'}); 33 | expect(onChange).not.toHaveBeenCalled(); 34 | expect(router.getCurrentUrl()).toEqual('project?tab=next'); 35 | }); 36 | }); 37 | -------------------------------------------------------------------------------- /allure-report-face/src/util/translation.js: -------------------------------------------------------------------------------- 1 | import i18next from 'i18next'; 2 | import intervalPlural from 'i18next-intervalplural-postprocessor/lib'; 3 | import settings from './settings'; 4 | 5 | export const LANGUAGES = [ 6 | {id: 'en', title: 'English'}, 7 | {id: 'zh', title: '简体中文'}, 8 | {id: 'ru', title: 'Русский'}, 9 | {id: 'ptbr', title: 'Português'} 10 | ]; 11 | 12 | LANGUAGES 13 | .map(lang => lang.id) 14 | .forEach(lang => addTranslation(lang, require('../translations/' + lang))); 15 | 16 | export function initTranslations() { 17 | return new Promise((resolve, reject) => { 18 | Object.assign(intervalPlural.options, { 19 | intervalRegex: /^\((\S*)\)\((.*)\)$/ 20 | }); 21 | i18next.use(intervalPlural).init({ 22 | lng: settings.get('language'), 23 | interpolation: { 24 | escapeValue: false 25 | }, 26 | fallbackLng: 'en' 27 | }, err => err ? reject(err) : resolve()); 28 | }); 29 | } 30 | 31 | export function addTranslation(lang, json) { 32 | i18next.on('initialized', () => { 33 | i18next.services.resourceStore.addResourceBundle(lang, i18next.options.ns[0], json); 34 | }); 35 | } 36 | 37 | export default i18next; 38 | -------------------------------------------------------------------------------- /allure-report-face/src/blocks/widget/styles.css: -------------------------------------------------------------------------------- 1 | @import "../../variables.css"; 2 | 3 | .widget { 4 | margin-bottom: $gap-size; 5 | position: relative; 6 | 7 | &_ghost { 8 | border: 1px dashed $border-accent-color; 9 | box-shadow: none; 10 | min-height: 50px; 11 | & > * { 12 | display: none; 13 | } 14 | } 15 | 16 | &__title { 17 | margin-top: 0; 18 | font-weight: lighter; 19 | text-transform: uppercase; 20 | } 21 | 22 | &__subtitle { 23 | color: $text-muted-color; 24 | font-size: 16px; 25 | text-transform: none; 26 | } 27 | 28 | &__flex-line { 29 | display: flex; 30 | } 31 | 32 | &__column { 33 | width: 50%; 34 | } 35 | 36 | &__handle { 37 | display: none; 38 | position: absolute; 39 | right: $gap-size; 40 | top: $gap-size; 41 | color: $text-muted-color; 42 | cursor: move; /* fallback if grab cursor is unsupported */ 43 | cursor: grab; 44 | 45 | &:active { 46 | cursor: grabbing; 47 | } 48 | 49 | .widget:hover & { 50 | display: block; 51 | } 52 | } 53 | 54 | &__table { 55 | border-top: 1px solid $border-color; 56 | margin: 0 -$gap-size; 57 | .table__row:last-child { 58 | border-bottom: 0; 59 | } 60 | } 61 | } -------------------------------------------------------------------------------- /allure-report-face/src/plugins/timeline/TimelineLayout.js: -------------------------------------------------------------------------------- 1 | import PaneLayout from '../../layouts/pane/PaneLayout'; 2 | import router from '../../router'; 3 | import TimelineModel from './TimelineModel'; 4 | import TimelineView from './TimelineView'; 5 | 6 | export default class TimelineLayout extends PaneLayout { 7 | 8 | initialize() { 9 | super.initialize(); 10 | this.model = new TimelineModel(); 11 | } 12 | 13 | loadData() { 14 | return this.model.fetch(); 15 | } 16 | 17 | onStateChange() { 18 | const changed = Object.assign({}, this.state.changed); 19 | const paneView = this.content.currentView; 20 | paneView.expanded = this.state.get('expanded'); 21 | if(!paneView.getRegion('timeline')) { 22 | paneView.addPane('timeline', new TimelineView({model: this.model})); 23 | } else { 24 | paneView.getRegion('timeline').currentView.onShow(true); 25 | } 26 | this.testcase.updatePanes('timeline', changed); 27 | paneView.updatePanesPositions(); 28 | } 29 | 30 | onRouteUpdate(testcase, attachment) { 31 | const expanded = router.getUrlParams().expanded === 'true'; 32 | this.state.set({testcase, attachment, expanded}); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /allure-java-adaptor-api/src/main/java/ru/yandex/qatools/allure/exceptions/AllureException.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.exceptions; 2 | 3 | /** 4 | * Signals a Allure error. Thrown to indicate problems with Allure 5 | * lifecycle. 6 | * 7 | * @author Dmitry Baev charlie@yandex-team.ru 8 | * Date: 10.24.13 9 | *

10 | * @see ru.yandex.qatools.allure.utils.AllureResultsUtils 11 | */ 12 | @SuppressWarnings("unused") 13 | public class AllureException extends RuntimeException { 14 | 15 | /** 16 | * Construct an new exception with message 17 | * 18 | * @param message initial message value 19 | */ 20 | public AllureException(String message) { 21 | super(message); 22 | } 23 | 24 | /** 25 | * Construct an new exception with message and some cause 26 | * 27 | * @param message initial message value 28 | * @param cause initial cause value 29 | */ 30 | public AllureException(String message, Throwable cause) { 31 | super(message, cause); 32 | } 33 | 34 | /** 35 | * Construct an new exception with cause 36 | * 37 | * @param cause initial cause value 38 | */ 39 | public AllureException(Throwable cause) { 40 | super(cause); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /allure-report-face/src/components/language-select/LanguageSelectView.js: -------------------------------------------------------------------------------- 1 | import './styles.css'; 2 | import PopoverView from '../popover/PopoverView'; 3 | import {className, on} from '../../decorators'; 4 | import template from './LanguageSelectView.hbs'; 5 | import i18next, { LANGUAGES } from '../../util/translation'; 6 | import settings from '../../util/settings'; 7 | import $ from 'jquery'; 8 | 9 | @className('language-select popover') 10 | class LanguageSelectView extends PopoverView { 11 | 12 | initialize() { 13 | super.initialize({position: 'right'}); 14 | } 15 | 16 | setContent() { 17 | this.$el.html(template({ 18 | languages: LANGUAGES, 19 | currentLang: settings.get('language') 20 | })); 21 | } 22 | 23 | show(anchor) { 24 | super.show(null, anchor); 25 | this.delegateEvents(); 26 | setTimeout(() => { 27 | $(document).one('click', () => this.hide()); 28 | }); 29 | } 30 | 31 | @on('click .language-select__item') 32 | onLanguageClick(e) { 33 | const langId = this.$(e.currentTarget).data('id'); 34 | settings.save('language', langId); 35 | i18next.changeLanguage(langId); 36 | } 37 | 38 | } 39 | 40 | export default LanguageSelectView; 41 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/defects/defects-list/DefectsListView.js: -------------------------------------------------------------------------------- 1 | import './styles.css'; 2 | import DataGridView from '../../../components/data-grid/DataGridView'; 3 | import {on} from '../../../decorators'; 4 | import router from '../../../router'; 5 | import template from './DefectsListView.hbs'; 6 | 7 | class DefectsListView extends DataGridView { 8 | template = template; 9 | settingsKey = 'defectsSettings'; 10 | 11 | initialize({state}) { 12 | this.state = state; 13 | this.listenTo(this.state, 'change:defect', (model, defect) => this.highlightItem(defect)); 14 | } 15 | 16 | onRender() { 17 | this.highlightItem(this.state.get('defect')); 18 | } 19 | 20 | @on('click .defects-list__item') 21 | onDefectClick(e) { 22 | const defectId = this.$(e.currentTarget).data('uid'); 23 | router.to('defects/' + defectId); 24 | } 25 | 26 | serializeData() { 27 | return { 28 | sorting: this.getSettings(), 29 | defectTypes: this.collection.toJSON().map(type => 30 | Object.assign({}, type, { 31 | defects: this.applySort(type.defects) 32 | }) 33 | ) 34 | }; 35 | } 36 | } 37 | 38 | export default DefectsListView; 39 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/report-stats/report-stats-widget/ReportStatsWidget.hbs: -------------------------------------------------------------------------------- 1 |

2 | Report stats 3 | 4 | {{#if report.url}} 5 | {{report.name}} 6 | {{else}} 7 | {{report.name}} 8 | {{/if}} 9 | 10 |

11 | 12 |
13 |
14 |
{{default report.version 'Latest'}}
15 |
Allure's version
16 |
17 | 18 |
19 |
20 |
21 | {{#if report.size}} 22 |
{{t 'index.DATA_SIZE'}}
23 |
{{filesize report.size}}
24 | {{/if}} 25 | {{#if report.time}} 26 |
{{t 'index.GENERATED'}}
27 |
{{duration report.time}}
28 | {{/if}} 29 |
30 |
31 |
32 |
33 | -------------------------------------------------------------------------------- /allure-report-data/src/test/groovy/ru/yandex/qatools/allure/data/plugins/GraphPluginTest.groovy: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.data.plugins 2 | 3 | import org.codehaus.groovy.runtime.InvokerHelper 4 | import org.junit.Test 5 | import ru.yandex.qatools.allure.data.AllureTestCase 6 | import ru.yandex.qatools.allure.data.utils.PluginUtils 7 | 8 | import static ru.yandex.qatools.allure.model.Status.PASSED 9 | 10 | /** 11 | * @author Dmitry Baev charlie@yandex-team.ru 12 | * Date: 07.02.15 13 | */ 14 | class GraphPluginTest { 15 | 16 | def plugin = new GraphPlugin() 17 | 18 | @Test 19 | void shouldSaveInfo() { 20 | def testCase = new AllureTestCase(uid: "uid", name: "name", title: "title", status: PASSED) 21 | plugin.process(testCase) 22 | assert plugin.graph.testCases.size() == 1 23 | 24 | use([InvokerHelper, PluginUtils]) { 25 | assert plugin.graph.testCases[0].getProperties() == testCase.toInfo().getProperties() 26 | } 27 | } 28 | 29 | @Test 30 | void shouldGetRightType() { 31 | assert plugin.type == AllureTestCase 32 | } 33 | 34 | @Test 35 | void shouldGetRightDataName() { 36 | assert plugin.pluginData 37 | assert plugin.pluginData.name == ["graph.json"] 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/defects/defect-view/DefectView.js: -------------------------------------------------------------------------------- 1 | import {LayoutView} from 'backbone.marionette'; 2 | import {region, behavior} from '../../../decorators'; 3 | import TestcaseTableView from '../../../components/testcase-table/TestcaseTableView'; 4 | import template from './DefectView.hbs'; 5 | 6 | @behavior('TooltipBehavior', {position: 'bottom'}) 7 | class DefectView extends LayoutView { 8 | template = template; 9 | 10 | @region('.defect__table') 11 | testcases; 12 | 13 | initialize({state}) { 14 | this.state = state; 15 | this.listenTo(this.state, 'change:testcase', (m, testcase) => this.showTestcase(testcase)); 16 | } 17 | 18 | onRender() { 19 | this.testcaseTable = new TestcaseTableView({ 20 | testCases: this.model.get('testCases'), 21 | currentCase: this.state.get('testcase'), 22 | baseUrl: 'defects/' + this.state.get('defect') 23 | }); 24 | this.testcases.show(this.testcaseTable); 25 | } 26 | 27 | showTestcase(testcase) { 28 | this.testcaseTable.highlightItem(testcase); 29 | } 30 | 31 | serializeData() { 32 | return Object.assign({ 33 | baseUrl: this.options.baseUrl 34 | }, super.serializeData()); 35 | } 36 | } 37 | 38 | export default DefectView; 39 | -------------------------------------------------------------------------------- /allure-testng-adaptor/src/test/java/ru/yandex/qatools/allure/testng/testdata/TestDataClass.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.testng.testdata; 2 | 3 | import org.testng.annotations.DataProvider; 4 | import org.testng.annotations.Test; 5 | 6 | import static org.hamcrest.CoreMatchers.equalTo; 7 | import static org.junit.Assert.assertThat; 8 | import static org.testng.Assert.fail; 9 | 10 | /** 11 | * Class with simple tests. It's used to check correctness of Allure TestNG listener. 12 | * 13 | * @author Kirill Kozlov kozlov.k.e@gmail.com 14 | * Date: 04.02.14 15 | */ 16 | public class TestDataClass { 17 | 18 | @Test 19 | public void passedTest() { } 20 | 21 | @Test 22 | public void failedTest() { 23 | fail(); 24 | } 25 | 26 | @Test(dependsOnMethods = "failedTest") 27 | public void skippedByDependencyTest() { } 28 | 29 | @DataProvider 30 | public Object[][] dataProvider() { 31 | return new Object[][] { 32 | {1}, {2}, {3} 33 | }; 34 | } 35 | 36 | @Test(dataProvider = "dataProvider") 37 | public void parametrizedTest(int parameter) { 38 | assertThat(parameter, equalTo(2)); 39 | } 40 | 41 | @Test(enabled = false, description = "This is pending test") 42 | public void pendingTest(){ 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/behaviors/behavior-view/BehaviorView.js: -------------------------------------------------------------------------------- 1 | import {LayoutView} from 'backbone.marionette'; 2 | import {region, behavior} from '../../../decorators'; 3 | import template from './BehaviorView.hbs'; 4 | import TestcaseTableView from '../../../components/testcase-table/TestcaseTableView'; 5 | 6 | @behavior('TooltipBehavior', {position: 'bottom'}) 7 | class BehaviorView extends LayoutView { 8 | template = template; 9 | 10 | @region('.behavior__testcases') 11 | testcases; 12 | 13 | initialize({state}) { 14 | this.state = state; 15 | this.listenTo(this.state, 'change:testcase', (m, testcase) => this.showTestcase(testcase)); 16 | } 17 | 18 | onRender() { 19 | this.testcaseTable = new TestcaseTableView({ 20 | testCases: this.model.get('testCases'), 21 | currentCase: this.state.get('testcase'), 22 | baseUrl: 'behaviors/' + this.state.get('behavior') 23 | }); 24 | this.testcases.show(this.testcaseTable); 25 | } 26 | 27 | showTestcase(testcase) { 28 | this.testcaseTable.highlightItem(testcase); 29 | } 30 | 31 | serializeData() { 32 | return Object.assign({ 33 | baseUrl: 'behaviors' 34 | }, super.serializeData()); 35 | } 36 | } 37 | 38 | export default BehaviorView; 39 | -------------------------------------------------------------------------------- /allure-java-annotations/src/main/java/ru/yandex/qatools/allure/annotations/Attachment.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.annotations; 2 | 3 | import java.lang.annotation.*; 4 | 5 | /** 6 | * A file with additional information captured during a test such 7 | * as log, screenshot, log file, dump, server response and so on. 8 | * When some test fails attachments help to understand the reason 9 | * of failure faster. 10 | *

11 | * An attachment is simply a method annotated with 12 | * {@link ru.yandex.qatools.allure.annotations.Attachment} returns 13 | * either String or byte array which should be added to report: 14 | *

15 | *

16 |  *  @Attachment(value = "Page screenshot", type = "image/png")
17 |  *  public byte[] saveScreenshot(byte[] screenShot) {
18 |  *      return screenShot;
19 |  *  }
20 |  *  
21 | * @author Dmitry Baev charlie@yandex-team.ru 22 | * Date: 15.05.14 23 | * 24 | * @since 1.4.0 25 | */ 26 | @Documented 27 | @Retention(RetentionPolicy.RUNTIME) 28 | @Target(ElementType.METHOD) 29 | public @interface Attachment { 30 | 31 | /** 32 | * Attachment name 33 | */ 34 | String value() default "{method}"; 35 | 36 | /** 37 | * Valid attachment MimeType, for example "text/plain" or "application/json" 38 | */ 39 | String type() default ""; 40 | } 41 | -------------------------------------------------------------------------------- /allure-report-data/src/main/resources/xsd/bindings.xjb: -------------------------------------------------------------------------------- 1 | 2 | 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 | -------------------------------------------------------------------------------- /allure-report-data/src/main/resources/xsd/report-data.xsd: -------------------------------------------------------------------------------- 1 | 2 | 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 | -------------------------------------------------------------------------------- /allure-report-face/src/components/side-nav/SideNavView.hbs: -------------------------------------------------------------------------------- 1 | 6 | 16 |
17 |
18 |
19 | 22 |
23 |
24 |
25 | 26 | Collapse 27 |
28 |
29 |
30 | -------------------------------------------------------------------------------- /allure-report-plugin-api/src/main/java/ru/yandex/qatools/allure/data/plugins/AttachmentsIndex.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.data.plugins; 2 | 3 | import ru.yandex.qatools.allure.data.AttachmentInfo; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * You can use this index to get information about 9 | * your report attachments during report generation. 10 | * 11 | * @author Dmitry Baev charlie@yandex-team.ru 12 | * Date: 10.07.15 13 | */ 14 | public interface AttachmentsIndex { 15 | 16 | /** 17 | * Finds the attachment by given uid. Returns null if there is 18 | * no attachment with such uid. 19 | * 20 | * @param uid uid to find attachment. 21 | * @return found attachment info or null if there is no attachment 22 | * with such uid. 23 | */ 24 | AttachmentInfo find(String uid); 25 | 26 | /** 27 | * Finds the attachment by given source. Returns null if there is 28 | * no attachment with such source. 29 | * 30 | * @param source source to find attachment. 31 | * @return found attachment info or null if there is no attachment 32 | * with such source. 33 | */ 34 | AttachmentInfo findBySource(String source); 35 | 36 | /** 37 | * Returns the list of all attachments found in result directories. 38 | */ 39 | List findAll(); 40 | } 41 | -------------------------------------------------------------------------------- /allure-report-plugin-api/src/main/resources/xsd/testcases.xjb: -------------------------------------------------------------------------------- 1 | 2 | 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 | -------------------------------------------------------------------------------- /allure-report-face/src/router.js: -------------------------------------------------------------------------------- 1 | import {omit} from 'underscore'; 2 | import {Router, history} from 'backbone'; 3 | import urlLib from 'url'; 4 | 5 | class AppRouter extends Router { 6 | constructor() { 7 | super({ 8 | routes: { 9 | '*default': 'notFound' 10 | } 11 | }); 12 | this.on('route', this.onRouteChange, this); 13 | } 14 | 15 | onRouteChange() { 16 | this.lastUrl = this.getCurrentUrl(); 17 | } 18 | 19 | getCurrentUrl() { 20 | return history.getFragment(); 21 | } 22 | 23 | reload() { 24 | history.loadUrl(this.getCurrentUrl()); 25 | } 26 | 27 | to(pathname, query, options) { 28 | query = omit(query, value => value === null); 29 | const url = urlLib.format({pathname, query}); 30 | return this.toUrl(url, options); 31 | } 32 | 33 | toUrl(url, options) { 34 | return this.navigate(url, Object.assign({trigger: true}, options)); 35 | } 36 | 37 | setSearch(search) { 38 | const {pathname} = urlLib.parse(this.getCurrentUrl()); 39 | return this.to(pathname, search); 40 | } 41 | 42 | getUrlParams() { 43 | const parsed = urlLib.parse(this.getCurrentUrl(), true); 44 | return parsed ? parsed.query : {}; 45 | } 46 | } 47 | 48 | export default new AppRouter(); 49 | -------------------------------------------------------------------------------- /allure-commons/src/main/java/ru/yandex/qatools/allure/commons/BadXmlCharacterFilterReader.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.commons; 2 | 3 | import java.io.FilterReader; 4 | import java.io.IOException; 5 | import java.io.Reader; 6 | 7 | import static ru.yandex.qatools.allure.config.AllureNamingUtils.replaceBadXmlCharactersBySpace; 8 | 9 | /** 10 | * @author Dmitry Baev charlie@yandex-team.ru 11 | * Date: 12.03.15 12 | */ 13 | public class BadXmlCharacterFilterReader extends FilterReader { 14 | 15 | /** 16 | * Creates a new filtered reader. 17 | * 18 | * @param in a Reader object providing the underlying stream. 19 | * @throws NullPointerException if in is null 20 | */ 21 | public BadXmlCharacterFilterReader(Reader in) { 22 | super(in); 23 | } 24 | 25 | /** 26 | * Reads characters into a portion of an array, then replace invalid XML characters 27 | * 28 | * @throws IOException If an I/O error occurs 29 | * @see ru.yandex.qatools.allure.config.AllureNamingUtils#isBadXmlCharacter(char) by space 30 | */ 31 | @Override 32 | public int read(char[] cbuf, int off, int len) throws IOException { 33 | int numChars = super.read(cbuf, off, len); 34 | replaceBadXmlCharactersBySpace(cbuf, off, len); 35 | return numChars; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /allure-java-adaptor-api/src/main/java/ru/yandex/qatools/allure/events/StepFailureEvent.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.events; 2 | 3 | import ru.yandex.qatools.allure.model.Status; 4 | import ru.yandex.qatools.allure.model.Step; 5 | 6 | /** 7 | * Using to mark current step as failed and attach for it {@link Throwable} 8 | * 9 | * @author Dmitry Baev charlie@yandex-team.ru 10 | * Date: 11.11.13 11 | *

12 | */ 13 | public class StepFailureEvent extends AbstractStepFailureEvent { 14 | 15 | /** 16 | * Change step status to {@link ru.yandex.qatools.allure.model.Status#FAILED} if 17 | * throwable instance of AssertionError and to {@link ru.yandex.qatools.allure.model.Status#BROKEN} 18 | * otherwise 19 | * 20 | * @param step which will be changed 21 | */ 22 | @Override 23 | public void process(Step step) { 24 | Status status = throwable instanceof AssertionError ? Status.FAILED : Status.BROKEN; 25 | step.setStatus(status); 26 | } 27 | 28 | /** 29 | * Set specified throwable to event using fluent-api interface 30 | * 31 | * @param throwable the throwable to set 32 | * @return modified instance 33 | */ 34 | public StepFailureEvent withThrowable(Throwable throwable) { 35 | setThrowable(throwable); 36 | return this; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /allure-report-data/src/test/groovy/ru/yandex/qatools/allure/data/plugins/PluginsIndexTest.groovy: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.data.plugins 2 | 3 | import com.google.inject.Guice 4 | import com.google.inject.Inject 5 | import groovy.transform.EqualsAndHashCode 6 | import org.junit.Test 7 | import ru.yandex.qatools.allure.data.AllureGuiceModule 8 | 9 | /** 10 | * @author Dmitry Baev charlie@yandex-team.ru 11 | * Date: 10.07.15 12 | */ 13 | class PluginsIndexTest { 14 | 15 | @Test 16 | public void shouldBeSingleton() throws Exception { 17 | def injector = Guice.createInjector(new AllureGuiceModule(getClass().classLoader)) 18 | 19 | def first = new SomeClassWithIndexInject() 20 | def second = new SomeClassWithIndexInject() 21 | injector.injectMembers(first) 22 | injector.injectMembers(second) 23 | 24 | assert first.index == second.index 25 | } 26 | 27 | class SomeClassWithIndexInject { 28 | 29 | @Inject 30 | PluginsIndex index 31 | } 32 | 33 | @EqualsAndHashCode 34 | class SomeInjectable { 35 | String value 36 | } 37 | 38 | abstract class SomePlugin { 39 | Class getType() { 40 | return SomeObject 41 | } 42 | } 43 | 44 | @EqualsAndHashCode 45 | class SomeObject { 46 | String someValue; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /allure-report-face/test/components/status-toggle.spec.js: -------------------------------------------------------------------------------- 1 | import settings from 'util/settings.js'; 2 | import StatusToggleView from 'components/status-toggle/StatusToggleView'; 3 | 4 | describe('StatusToggle', function () { 5 | const statistics = {failed: 1, broken: 1, canceled: 1, pending: 1, passed: 1}; 6 | 7 | beforeEach(function () { 8 | settings.set('visibleStatuses', {failed: true, broken: true}); 9 | this.view = new StatusToggleView({statistics}).render(); 10 | this.el = this.view.$el; 11 | }); 12 | 13 | it('should render buttons according to settings', function () { 14 | expect([...this.el.find('.button')].map(button => button.textContent)) 15 | .toEqual(['Failed (1)', 'Broken (1)', 'Canceled (1)', 'Pending (1)', 'Passed (1)']); 16 | expect([...this.el.find('.button_active')].map(button => button.textContent)) 17 | .toEqual(['Failed (1)', 'Broken (1)']); 18 | }); 19 | 20 | it('should update model on click', function () { 21 | const passed = this.el.find('.status-toggle__button_status_passed'); 22 | passed.click(); 23 | expect(settings.get('visibleStatuses')).toEqual({failed: true, broken: true, passed: true}); 24 | 25 | passed.click(); 26 | expect(settings.get('visibleStatuses')).toEqual({failed: true, broken: true, passed: false}); 27 | }); 28 | }); 29 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/xunit/testsuite-view/TestsuiteView.js: -------------------------------------------------------------------------------- 1 | import {LayoutView} from 'backbone.marionette'; 2 | import {region, behavior} from '../../../decorators'; 3 | import template from './TestsuiteView.hbs'; 4 | import TestcaseTableView from '../../../components/testcase-table/TestcaseTableView'; 5 | 6 | @behavior('TooltipBehavior', {position: 'bottom'}) 7 | class TestsuiteView extends LayoutView { 8 | template = template; 9 | 10 | @region('.testsuite__testcases') 11 | testcases; 12 | 13 | initialize({testsuite, state}) { 14 | this.state = state; 15 | this.listenTo(this.state, 'change:testcase', (m, testcase) => this.showTestcase(testcase)); 16 | this.model = testsuite; 17 | } 18 | 19 | onRender() { 20 | this.testcaseTable = new TestcaseTableView({ 21 | testCases: this.model.get('testCases'), 22 | currentCase: this.state.get('testcase'), 23 | baseUrl: 'xUnit/' + this.state.get('testsuite') 24 | }); 25 | this.testcases.show(this.testcaseTable); 26 | } 27 | 28 | showTestcase(testcase) { 29 | this.testcaseTable.highlightItem(testcase); 30 | } 31 | 32 | serializeData() { 33 | return Object.assign({ 34 | baseUrl: this.options.baseUrl 35 | }, super.serializeData()); 36 | } 37 | } 38 | 39 | export default TestsuiteView; 40 | -------------------------------------------------------------------------------- /allure-java-annotations/src/main/java/ru/yandex/qatools/allure/annotations/Parameter.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.annotations; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * You can use this annotation to add parameters to your tests: 11 | *

12 |  * @Parameter("My Param")
13 |  * private String myParameter;
14 |  *
15 |  * @Test
16 |  * public void myTest() throws Exception {
17 |  *      myParameter = "first";
18 |  *      myParameter = "second";
19 |  *      myParameter = "third";
20 |  * }
21 |  * 
22 | * All three values will be added to report 23 | * 24 | * Note that the initializations of constant fields (static final fields 25 | * where the initializer is a constant string object or primitive value) 26 | * are not join points, since Java requires their references to be inlined. 27 | * 28 | * value - it's name of parameter, field name by default 29 | * 30 | * @author Dmitry Baev charlie@yandex-team.ru 31 | * Date: 19.06.14 32 | * 33 | * 34 | */ 35 | @Documented 36 | @Retention(RetentionPolicy.RUNTIME) 37 | @Target({ElementType.FIELD, ElementType.PARAMETER}) 38 | public @interface Parameter { 39 | 40 | String value() default ""; 41 | 42 | } 43 | -------------------------------------------------------------------------------- /allure-report-face/src/variables.css: -------------------------------------------------------------------------------- 1 | $brand-blue: #0044bb; 2 | $brand-red: #ff0000; 3 | 4 | $color-passed: #97cc64; 5 | $color-failed: #fd5a3e; 6 | $color-broken: #ffd050; 7 | $color-canceled: #aaa; 8 | $color-pending: #d35ebe; 9 | 10 | $background-passed: #a6e19d; 11 | $background-failed: #ffaca6; 12 | $background-broken: #ffeca0; 13 | $background-canceled: #cccccc; 14 | $background-pending: #ecb7e2; 15 | 16 | $header-bg: #fff; 17 | $heading-bg: #f6f5f3; 18 | $body-bg: #fff; 19 | $content-bg: #fff; 20 | 21 | $border-color: #ECEFF1; 22 | $border-accent-color: #e5e5e5; 23 | 24 | $hover-color: #e4edfe; 25 | $selected-color: #ffeca0; 26 | $summary-color: #f6f5f3; 27 | 28 | $text-color: #000; 29 | $text-muted-color: #999; 30 | 31 | $gap-size: 15px; 32 | 33 | $small-screen: 1000px; 34 | 35 | /* Sidebar **/ 36 | 37 | $sidebar-full-width: 180px; 38 | $sidebar-collapsed: 60px; 39 | 40 | $sidebar-separator-color: #4d4d4d; 41 | $sidebar-active-accent-color: #64B5F6; 42 | $app-nav-bg: #343434; 43 | $sidebar-active-text-color: #fff; 44 | $sidebar-hover-text-color: #fff; 45 | $sidebar-brand-color: #fff; 46 | $sidebar-text-shadow-color: #000; 47 | 48 | 49 | /* Links */ 50 | 51 | $link-color: #1976D2; 52 | $link-color-hover: #f00; 53 | 54 | /* Pane set */ 55 | 56 | $pane-bg-color: #fff; 57 | $pane-border-color: #cdd0d2; 58 | $pane-overlay-bg: rgba(240, 240, 240, 0.4); 59 | $pane-overlay-bg-hover: rgba(240, 240, 240, 0.2); 60 | -------------------------------------------------------------------------------- /allure-java-adaptor-api/src/main/java/ru/yandex/qatools/allure/events/StepStartedEvent.java: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.events; 2 | 3 | 4 | import ru.yandex.qatools.allure.model.Status; 5 | import ru.yandex.qatools.allure.model.Step; 6 | 7 | /** 8 | * Using to start new step 9 | * 10 | * @author Dmitry Baev charlie@yandex-team.ru 11 | * Date: 11.11.13 12 | *

13 | * @see ru.yandex.qatools.allure.Allure 14 | */ 15 | public class StepStartedEvent extends AbstractStepStartedEvent { 16 | 17 | /** 18 | * Constructs an new event with specified name 19 | * 20 | * @param name initial name value 21 | */ 22 | public StepStartedEvent(String name) { 23 | setName(name); 24 | } 25 | 26 | /** 27 | * Sets name, status, start time and title to specified step 28 | * 29 | * @param step which will be changed 30 | */ 31 | @Override 32 | public void process(Step step) { 33 | step.setName(getName()); 34 | step.setStatus(Status.PASSED); 35 | step.setStart(System.currentTimeMillis()); 36 | step.setTitle(getTitle()); 37 | } 38 | 39 | /** 40 | * Sets title using fluent-api 41 | * 42 | * @param title value to set 43 | * @return modified instance 44 | */ 45 | public StepStartedEvent withTitle(String title) { 46 | setTitle(title); 47 | return this; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /allure-report-face/src/components/testcase-table/TestcaseTableView.hbs: -------------------------------------------------------------------------------- 1 |

2 |

{{totalCount}} test cases

3 |
4 |
5 |
6 |
7 |
#
9 | {{> ../../blocks/table/sortable-col field="name" title="Title" class=(b "testcase-table" "name")}} 10 | {{> ../../blocks/table/sortable-col field="time.duration" title="Duration"}} 11 |
Status
12 |
13 | {{#each testCases}} 14 | 15 |
{{index}}
16 |
{{title}}
17 |
{{duration time.duration}}
18 |
19 | {{status}} 20 |
21 |
22 | {{/each}} 23 |
24 | -------------------------------------------------------------------------------- /allure-report-face/src/components/chart/styles.css: -------------------------------------------------------------------------------- 1 | @import "../../variables.css"; 2 | 3 | .chart { 4 | margin-right: $gap-size; 5 | margin-bottom: $gap-size; 6 | margin-top: $gap-size; 7 | position: relative; 8 | flex: 1; 9 | &__title { 10 | margin-top: 0; 11 | margin-bottom: $gap-size; 12 | font-size: 18px; 13 | } 14 | &__caption { 15 | text-anchor: middle; 16 | } 17 | &__svg { 18 | width: 100%; 19 | height: 100%; 20 | } 21 | &__wrap { 22 | width: 50%; 23 | &:nth-child(2) ~ & { 24 | .chart { 25 | margin-top: 0; 26 | } 27 | } 28 | } 29 | &__bar { 30 | fill: $brand-blue; 31 | } 32 | &__arc { 33 | stroke: #FFF; 34 | stop-opacity: 0; 35 | } 36 | &__fill { 37 | &_status_FAILED { 38 | fill: $color-failed 39 | } 40 | &_status_BROKEN { 41 | fill: $color-broken; 42 | } 43 | &_status_PASSED { 44 | fill: $color-passed; 45 | } 46 | &_status_PENDING { 47 | fill: $color-pending; 48 | } 49 | &_status_CANCELED { 50 | fill: $color-canceled; 51 | } 52 | } 53 | &__axis { 54 | path, line { 55 | shape-rendering: crispEdges; 56 | stroke: #000; 57 | fill: none; 58 | } 59 | } 60 | } 61 | 62 | @media (max-width: $small-screen) { 63 | .chart__wrap { 64 | width: 100%; 65 | &:nth-child(2) .chart { 66 | margin-top: 0; 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /allure-report-face/src/components/status-toggle/StatusToggleView.js: -------------------------------------------------------------------------------- 1 | import './styles.css'; 2 | import {ItemView} from 'backbone.marionette'; 3 | import capitalize from 'underscore.string/capitalize'; 4 | import {on} from '../../decorators'; 5 | import settings from '../../util/settings'; 6 | import template from './StatusToggleView.hbs'; 7 | 8 | class StatusToggleView extends ItemView { 9 | template = template; 10 | 11 | initialize({statistics}) { 12 | this.statistics = statistics; 13 | } 14 | 15 | serializeData() { 16 | const statuses = settings.get('visibleStatuses'); 17 | return { 18 | statistics: ['failed', 'broken', 'canceled', 'pending', 'passed'].map( status => ({ 19 | status: status, 20 | active: !!statuses[status], 21 | title: capitalize(status.toString()), 22 | count: this.statistics[status] 23 | })) 24 | }; 25 | } 26 | 27 | @on('click .button') 28 | onCheckChange(e) { 29 | const el = this.$(e.currentTarget); 30 | el.toggleClass('button_active'); 31 | const name = el.data('status'); 32 | const checked = el.hasClass('button_active'); 33 | const statuses = settings.get('visibleStatuses'); 34 | settings.save('visibleStatuses', Object.assign({}, statuses, {[name]: checked})); 35 | } 36 | } 37 | 38 | export default StatusToggleView; 39 | -------------------------------------------------------------------------------- /allure-report-face/src/plugins/defects/defects-list/DefectsListView.hbs: -------------------------------------------------------------------------------- 1 | 2 | {{#each defectTypes}} 3 |

4 | {{t (concat "defects." title)}} 5 | {{t 'defects.STATISTIC' postProcess='interval' count=defects.length}} 6 |

7 |
8 |
9 |
11 | {{t "defects.COUNT"}} 12 |
13 | {{> ../../../blocks/table/sortable-col field="failure.message" title=(t "defects.DEFECT") sorting=../sorting}} 14 |
15 | {{#each defects}} 16 | 17 |
18 | {{testCases.length}} 19 |
20 |
{{failure.message}}
21 |
22 | {{/each}} 23 |
24 | {{/each}} 25 | -------------------------------------------------------------------------------- /allure-report-face/src/util/TestcasePanes.js: -------------------------------------------------------------------------------- 1 | import TestcaseModel from '../data/testcase/TestcaseModel'; 2 | import TestcaseView from '../components/testcase-view/TestcaseView'; 3 | import AttachmentView from '../components/attachment/AttachmentView'; 4 | 5 | export default class TestcasePanes { 6 | constructor(state, paneView) { 7 | this.state = state; 8 | this.paneView = paneView; 9 | this.testcase = new TestcaseModel(); 10 | } 11 | 12 | updatePanes(baseUrl, changed) { 13 | const testcaseUid = this.state.get('testcase'); 14 | if(this.testcase.id !== testcaseUid) { 15 | this.testcase.clear(); 16 | if(testcaseUid) { 17 | this.testcase.set({uid: testcaseUid}); 18 | this.testcase.fetch().then(() => this.updatePanes(baseUrl, changed)); 19 | return; 20 | } 21 | } 22 | this.paneView.updatePane('testcase', changed, () => new TestcaseView({ 23 | baseUrl, 24 | state: this.state, 25 | model: this.testcase 26 | })); 27 | this.paneView.updatePane('attachment', changed, () => new AttachmentView({ 28 | baseUrl: baseUrl + '/' + this.state.get('testcase'), 29 | attachment: this.testcase.getAttachment(changed.attachment), 30 | state: this.state 31 | })); 32 | this.paneView.updatePanesPositions(); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /allure-report-data/src/main/groovy/ru/yandex/qatools/allure/data/plugins/EnvironmentPlugin.groovy: -------------------------------------------------------------------------------- 1 | package ru.yandex.qatools.allure.data.plugins 2 | 3 | import ru.yandex.qatools.allure.data.KeyValueWidgetItem 4 | import ru.yandex.qatools.commons.model.Environment 5 | 6 | /** 7 | * @author Dmitry Baev charlie@yandex-team.ru 8 | * Date: 18.02.15 9 | */ 10 | @Plugin.Name("environment") 11 | @Plugin.Priority(100) 12 | class EnvironmentPlugin extends AbstractPlugin implements ProcessPlugin, WithWidget { 13 | 14 | @Plugin.Data 15 | Environment environment = new Environment( 16 | id: UUID.randomUUID().toString(), name: "Allure Test Pack"); 17 | 18 | @Override 19 | void process(Environment data) { 20 | environment.id = data.id ?: environment.id 21 | environment.name = data.name ?: environment.name 22 | environment.url = data.url ?: environment.url 23 | 24 | for (def parameter : data.parameter) { 25 | if (!environment.parameter.count { it.key == parameter.key }) { 26 | environment.parameter.add(parameter) 27 | } 28 | 29 | } 30 | } 31 | 32 | @Override 33 | Class getType() { 34 | Environment 35 | } 36 | 37 | @Override 38 | Object getWidgetData() { 39 | environment.parameter.collect { 40 | new KeyValueWidgetItem(key: it.key, value: it.value) 41 | }.sort { it.key } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /allure-java-adaptor-api/src/main/resources/bindings.xjb: -------------------------------------------------------------------------------- 1 | 2 | 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 | --------------------------------------------------------------------------------