在 Cucumber 中通过 CSV 文件使用剩余数据 [英] Using rest data through CSV file in Cucumber

查看:17
本文介绍了在 Cucumber 中通过 CSV 文件使用剩余数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过 CSV 文件上传测试数据,而不是在 cucumber 中使用功能文件.有没有办法在功能文件中上传 CSV 以获取测试数据?

I want to upload test data through a CSV file instead of using a feature file in cucumber. Is there any way to upload CSV in feature file for test data?

推荐答案

在 Cucumber 中没有办法用 csv 文件替换特征文件.您需要从您的步骤中读取 csv 文件.

There is no way to replace a feature file with a csv file in Cucumber. You need to read the csv file from your steps.

如果您使用 Java,Apache POI 可能是一种选择.

If you are on Java, Apache POI may one option.

这篇关于在 Cucumber 中通过 CSV 文件使用剩余数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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