【问题标题】:How to automate multiple test如何自动化多个测试
【发布时间】:2013-08-14 16:00:46
【问题描述】:

我正在使用 casperjs 来运行前端测试。我试图找出自动化执行测试的最佳方法。我需要一种方法来启动 5 个单独的文件,并在任何时候检测到失败,不知道如何最好地做到这一点。

谢谢

【问题讨论】:

    标签: automated-tests casperjs


    【解决方案1】:

    我最终编写了自己的 shell 脚本,它会自动运行。

    > output
    for f in *.js
    do
        echo "starting test"
        casperjs test $f >> output
    done
    
    if grep "FAIL" output 
        then echo "error occured"
        else echo "test was successful"
    fi
    

    这是一个简化版本,您可以在失败时发送电子邮件等。

    【讨论】:

      猜你喜欢
      • 2014-07-18
      • 2020-02-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-10-05
      • 2014-06-15
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多