allure-python icon indicating copy to clipboard operation
allure-python copied to clipboard

Fix deserialization issue when parameter value is array

Open strufkin opened this issue 4 years ago • 1 comments

Context

If you have custom converter which makes an array from parameter string from feature file, allure will throw below exception upon report generation, hence we have to make this to be string back:

Could not read test result file allure\e3769575-aa8f-404e-9068-732f53e6db7c-result.json
com.fasterxml.jackson.databind.exc.MismatchedInputException: 
Cannot deserialize value of type `java.lang.String` from Array value (token `JsonToken.START_ARRAY`)
 at [Source: (sun.nio.ch.ChannelInputStream); line: 1, column: 15070] 
 (through reference chain: io.qameta.allure.model.TestResult["parameters"]->java.util.ArrayList[2]->io.qameta.allure.model.Parameter["value"])
        at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59)

Checklist

strufkin avatar Dec 01 '21 10:12 strufkin

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Dec 01 '21 10:12 CLAassistant