Origen sdk 如何在Origen中启用规范测试
随着我们的应用程序接近生产就绪,我们已经编写了大量的规范测试。最初,我们使用Origen sdk 如何在Origen中启用规范测试,origen-sdk,Origen Sdk,随着我们的应用程序接近生产就绪,我们已经编写了大量的规范测试。最初,我们使用bundle exec rspec spec/myspec_spec.rb运行单个文件。当我尝试使用origenspecs命令时,它没有像我预期的那样重新识别该命令 peologin02:ppekit $ origen specs Error: Command not recognized: specs Usage: origen COMMAND [ARGS] The core origen commands are:
bundle exec rspec spec/myspec_spec.rb
运行单个文件。当我尝试使用origenspecs
命令时,它没有像我预期的那样重新识别该命令
peologin02:ppekit $ origen specs
Error: Command not recognized: specs
Usage: origen COMMAND [ARGS]
The core origen commands are:
environment Display or set the environment (short-cut alias: "e")
target Display or set the target (short-cut alias: "t")
mode Display or set the mode (short-cut alias: "m")
plugin Display or set the plugin (short-cut alias: "pl")
generate Generate a test pattern (short-cut alias: "g")
program Generate a test program (short-cut alias: "p")
interactive Start an interactive Origen console (short-cut alias: "i")
compile Compile a template file or directory (short-cut alias: "c")
exec Execute any Ruby file with access to your app environment
rc Revision control commands, see -h for details
save Save the new or changed files from the last run or a given log file
lsf Monitor and manage LSF jobs (short-cut alias: "l")
web Web page tools, see -h for details
time Tools for test time analysis and forecasting
lint Lint and style check (and correct) your application code
我没有看到任何关于规格测试的信息
thx新的应用程序模板中包含了origen_规格的实现,但被注释掉了 看看你的应用程序的
config/commands.rb
文件,希望这只是一个取消注释所需行的问题
origen应用程序和插件中常用的origen specs
命令没有什么神奇之处,它只是包装了您已经在使用origen命令启动器执行的操作
该过程将遵循如何在此处添加特定于应用程序的命令的指南:
然后,specs
命令的内容就是:
运行单元测试
当“规格”
需要“rspec”
退出RSpec::Core::Runner.run(['spec'])
以上只是通过编程调用应用程序的spec目录上的RSpec,并将RSpec的退出代码(即通过/失败)分配给origen
命令的结果