使用bamboo测试框架
Bamboo测试框架好用是好用,但是有一套规则,必须按这套规则写,才能顺利地跑起来。
下面是几大规则:
local testing = require 'bamboo.testing'context("TestApp Testing", function() context("interaction", function() test("do it", function() local tester = testing.browser("tester") -- click assumes you want a 200 all the time and just returns -- the response it got local resp = tester:click("/") ptable(resp) resp = tester:click('/hello/') ptable(resp) end) end)end)