M.Sz
M.Sz

Reputation: 63

Empty allure report - Allure Report unknown NaN%

I have a problem with allure reports. When I run command ./gradlew allureReport after tests execution I've got an empty report with text like 'Allure Report unknown NaN%'. Does anyone have the same problem? Here is my build.gradle configuration file:

buildscript {
repositories {
    jcenter()
}
dependencies {
    classpath "io.qameta.allure:allure-gradle:2.8.1"
}
}

plugins {
    id "io.qameta.allure" version "2.8.1"
    id 'java'
}

apply plugin: 'io.qameta.allure'

allure {
    version = '2.8.1'
    autoconfigure = true;
    aspectjweaver = true;
resultsDir = file('/build/allure-results')
reportDir = file('build/allure-results')
}

group 'com.poc'
version '1.0-SNAPSHOT'

sourceCompatibility = 1.8

repositories {
    mavenCentral()
}

test {
    useTestNG()
    dependsOn cleanTest
    systemProperties System.getProperties()
}

dependencies {
    compile group: 'junit', name: 'junit', version: '4.12'
    compile group: 'org.seleniumhq.selenium', name: 'selenium-java', version: '3.141.59'
    compile group: 'org.seleniumhq.selenium', name: 'selenium-firefox-driver', version: '3.141.59'
    compile group: 'org.testng', name: 'testng', version: '6.14.3'
    compile group: 'org.seleniumhq.selenium', name: 'selenium-chrome-driver', version: '3.141.59'
    compile group: 'org.seleniumhq.selenium', name: 'selenium-safari-driver', version: '3.141.59'
    compile group: 'org.seleniumhq.selenium', name: 'selenium-edge-driver', version: '2.47.1'
    compile group: 'org.seleniumhq.selenium', name: 'selenium-api', version: '3.141.59'
    compile group: 'org.projectlombok', name: 'lombok', version: '1.18.10'
    compile group: 'mysql', name: 'mysql-connector-java', version: '5.1.13'
    compile group: 'org.apache.pdfbox', name: 'pdfbox', version: '2.0.1'
    compile group: 'mysql', name: 'mysql-connector-java', version: '5.1.6'
    compile group: 'commons-io', name: 'commons-io', version: '2.6'
    compile group: 'io.qameta.allure', name: 'allure-testng', version: '2.8.1'
}

Upvotes: 0

Views: 6017

Answers (4)

user22550284
user22550284

Reputation: 1

Please copy the correct report folder location Paste below report generation command in Terminal: allure serve "D:\pythonProject\pythonProject\SeleniumPython\SeleniumFramework\tests\SeleniumFramework\reports\allureReports"

NOTE: Before copying the report location path first check report is there

Upvotes: 0

I also faced the same issue and you have to specify the path within the double quotes in the command prompt if there are any white spaces between the folder names.

For example, if your allure results are in the following folder - D:\test automation\webautomation\allure-results, you have to specify the command as below.

allure serve "D:\test automation\webautomation\allure-results"

Upvotes: 0

Amar
Amar

Reputation: 1

It seems that there are spaces in one of the parent folder names. So, if there are spaces in folder name, keep the folder name in double quotes. Refer to the example below:

Run Allure command(allure serve) by keeping folder name in double quotes. Suppose folder name is test automation

Incorrect: allure serve D:\test automation\webautomation\allure-results

Correct: allure serve D:\"test automation"\webautomation\allure-results

Upvotes: 0

Nikita Bakshi
Nikita Bakshi

Reputation: 121

You have not added the allure-maven dependency under your dependencies section.I think that's why you are getting this NaN% error.

Upvotes: 1

Related Questions