在Json有效负载中未正确获取CSV文件特定列的值(空手道框架) [英] Values of a particular column of CSV file is not fetched properly in Json payload (Karate Framework)

查看:39
本文介绍了在Json有效负载中未正确获取CSV文件特定列的值(空手道框架)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我也在指定的情况下工作. 我的.csv文件如下:

I am working on specified scenario too. My .csv file is as follows:

测试步骤为:

Scenario Outline: Create new content value for movie: '<Movie>'
    When json payload = {'attributes':[{'entity_attribute_id': 41,'value': '<Genre>'},{'entity_attribute_id': 42, 'value': '<Language>'},{'entity_attribute_id': 39,'value': '<Movie>'},{'entity_attribute_id': 101,'value': '2020-12-03'}],'entity_type_id': '10'} 
    Given url baseUrl + postContentValues   
    And request payload
    When method post
    Then status 200
    And print response
    And def contentId = response.id

    Examples:
    |read('RoughTable.csv')  |

在执行测试时,不会提取电影" ,而类型"和从".csv"文件中按预期获得语言"

On test execution, "Movie" are not fetched while "Genre" & "Language" are obtained as expected from .csv file

请指导我解决此问题.

推荐答案

我认为CSV加载可能存在问题.您能否在Movie之前添加一个额外的虚拟列.

I think there may be an issue with CSV loading. Can you add an extra dummy column before Movie.

无论哪种方式,请提交一种复制方式,这将帮助我们解决该问题: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue

Either way, please submit a way to replicate, this will help us fix it: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue

这篇关于在Json有效负载中未正确获取CSV文件特定列的值(空手道框架)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆