我在Cucumber特性文件中广泛使用数据表。 数据表通常是数据库表的转储,我会将其导出为竖线分隔格式并且未能正确对齐。
Cucumber-JVM中是否有自动对齐数据表的选项?
我在Cucumber特性文件中广泛使用数据表。 数据表通常是数据库表的转储,我会将其导出为竖线分隔格式并且未能正确对齐。
Cucumber-JVM中是否有自动对齐数据表的选项?
正如Joe所说,--autoformat
特性已不再可用。
我发现 cucumber --dry-run --format pretty --quiet --no-color
已经基本可以满足你的需求,尽管你需要一些字符串操作才能写回到文件中。
cucumber --autoformat . -t @myuglytests
cucumber -help
-a, --autoformat DIR Reformats (pretty prints) feature files and write them to DIRECTORY.
Be careful if you choose to overwrite the originals.
Implies --dry-run --format pretty.
reformat
命令,但是该CLI 在v2.2.8中被删除。因此,似乎不再有任何方法来实现这一点? - Joe对于 Eclipse IDE,您可以使用 Ctrl + Shift + F 快捷键来执行 Feature 文件中的“格式化”操作。
Ctrl + Alt + L
对我很有效!! :)