昨天,这个article在突变测试上出了点问题,立即尝试了elasticrepo,这是我在elasticsearch上编写的一个索引github的库。
显然,我似乎遗漏了一些东西,因为我没有得到任何所谓的"Killed: rspec“和零突变:
lsoave@ubuntu:~/rails/github/elasticrepo$ mutant -I lib/elasticrepo -r repo_subset --rspec-dm2 ::RepoSubset
Mutant configuration:
Matcher: #<Mutant::Matcher::ObjectSpace scope_name_pattern=/\ARepoSubset(\z|::)/>
Filter: Mutant::Mutation::Filter::ALL
Strategy: #<Mutant::Strategy::Rspec::DM2>
subjects: 0
mutations: 0
noop_fails: 0
kills: 0
alive: 0
mtime: 0.00s
rtime: 0.01s
lsoave@ubuntu:~/rails/github/elasticrepo$ 现在我认为它可能与路径相关,然后在本例中是:
lsoave@ubuntu:~/rails/github/elasticrepo$ ls -l lib/elasticrepo
total 16
-rw-rw-r-- 1 lsoave lsoave 333 Jun 8 16:07 extractor.rb
-rw-rw-r-- 1 lsoave lsoave 1960 Jun 8 16:07 indexer.rb
-rw-rw-r-- 1 lsoave lsoave 1330 Jun 8 16:07 repo_subset.rb
-rw-rw-r-- 1 lsoave lsoave 43 Jun 1 12:28 version.rb
lsoave@ubuntu:~/rails/github/elasticrepo$ 这里是要测试的类的“结构”(就命名空间而言):
lsoave@ubuntu:~/rails/github/elasticrepo$ head -2 lib/elasticrepo/repo_subset.rb
module Elasticrepo
class RepoSubset
lsoave@ubuntu:~/rails/github/elasticrepo$ 请随时检查整个代码,以测试是否发生突变:elasticrepo
由于响应行的原因,regex也有可能出现问题:
Matcher: #<Mutant::Matcher::ObjectSpace scope_name_pattern=/\ARepoSubset(\z|::)/>有人能帮上忙吗?
发布于 2013-06-09 22:24:37
免责声明:这里是mutant的作者。
刚克隆了你的回收站。需要更改:
--use rspec。请注意,对于当前的发行版,标志
::Elasticrepo::RepoSubset使用此更改后,Mutant确实可以正确运行。
变异快乐!
https://stackoverflow.com/questions/17006961
复制相似问题