Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with deserialize io.qameta.allure.model.Status from String "passed" #25

Open
prafair opened this issue Jul 5, 2022 · 1 comment

Comments

@prafair
Copy link

prafair commented Jul 5, 2022

The problem

After update to new allure-model version (just wanted to see how it works):

implementation("io.qameta.allure:allure-model:2.18.1")

I received this error:

java.lang.RuntimeException: com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `io.qameta.allure.model.Status` from String "passed": not one of the values accepted for Enum class: [SKIPPED, FAILED, PASSED, BROKEN]
 at [Source: (File); line: 1, column: 652] (through reference chain: io.github.eroshenkoam.allure.model.TestResult["status"])
	at io.github.eroshenkoam.allure.MainCommand.run(MainCommand.java:57)
	at picocli.CommandLine.executeUserObject(CommandLine.java:1769)
	at picocli.CommandLine.access$900(CommandLine.java:145)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2141)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2108)
	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:1975)
	at picocli.CommandLine.execute(CommandLine.java:1904)
	at io.github.eroshenkoam.allure.AllurePDF.main(AllurePDF.java:13)
Caused by: com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `io.qameta.allure.model.Status` from String "passed": not one of the values accepted for Enum class: [SKIPPED, FAILED, PASSED, BROKEN]
 at [Source: (File); line: 1, column: 652] (through reference chain: io.github.eroshenkoam.allure.model.TestResult["status"])
	at com.fasterxml.jackson.databind.exc.InvalidFormatException.from(InvalidFormatException.java:67)
	at com.fasterxml.jackson.databind.DeserializationContext.weirdStringException(DeserializationContext.java:1991)
	at com.fasterxml.jackson.databind.DeserializationContext.handleWeirdStringValue(DeserializationContext.java:1219)
	at com.fasterxml.jackson.databind.deser.std.EnumDeserializer._deserializeAltString(EnumDeserializer.java:356)
	at com.fasterxml.jackson.databind.deser.std.EnumDeserializer._fromString(EnumDeserializer.java:230)
	at com.fasterxml.jackson.databind.deser.std.EnumDeserializer.deserialize(EnumDeserializer.java:198)
	at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:313)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:176)
	at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:323)
	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4674)
	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3494)
	at io.github.eroshenkoam.allure.AllurePDFGenerator.generate(AllurePDFGenerator.java:99)
	at io.github.eroshenkoam.allure.MainCommand.run(MainCommand.java:54)
	... 7 more

Failed test result JSON:

{
  "uuid": "4825f60e-c3e3-40cd-bfc4-5a1d67d2c5ff",
  "historyId": "3b0ee4c165fbdfdc525141f5c6cbb2e2",
  "testCaseId": "[engine:archunit]/[class:<my_class>]/[field:<test_method_name>]",
  "testCaseName": "t<test_method_name>",
  "labels": [
    {
      "name": "junit.platform.uniqueid",
      "value": "[engine:archunit]/[class:<my_class>]/[field:<test_method_name>]"
    },
    {
      "name": "host",
      "value": "MacBook-Pro-4"
    },
    {
      "name": "thread",
      "value": "[email protected] worker(1)"
    },
    {
      "name": "framework",
      "value": "junit-platform"
    },
    {
      "name": "language",
      "value": "java"
    }
  ],
  "links": [],
  "name": "<test_method_name>",
  "status": "passed",
  "stage": "finished",
  "description": "",
  "steps": [],
  "attachments": [],
  "parameters": [],
  "start": 1656580404080,
  "stop": 1656580404083
}

Tell us about your environment

  • allure-pdf version: 1.6.0
  • JUnit version: 5.8.2
  • Allure version: 2.18.1
@jayanthmuthu10
Copy link

Try like this..

C:\Users\54978\Playwright\allure-pdf-1.6.0\bin>allure-pdf "C:\Users\54978\Playwright\SGEF_V3_Jayanth\allure-results" -o report1.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants