CSC/ECE 517 Spring 2013/OSS E600: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 14: Line 14:


== Setup ==
== Setup ==
Setting up the coverage environment is very similar to using cucumber.  The majority of the instructions in the old cucumber [http://wiki.expertiza.ncsu.edu/index.php?title=Using_Cucumber_with_Expertiza wiki] still apply.<ref name='old_wiki'>http://wiki.expertiza.ncsu.edu/index.php?title=Using_Cucumber_with_Expertiza</ref>
<pre>
gem install relevance-rcov
bundle install
rake db:create
rake db:test:prepare
</pre>
Modify the file ./lib/task/cucumber.rake.  Add line "t.rcov=true" below each of the three t.profile lines.
<pre>
    Cucumber::Rake::Task.new({:ok => 'db:test:prepare'}, 'Run features that should pass') do |t|
      t.binary = vendored_cucumber_bin # If nil, the gem's binary is used.
      t.fork = true # You may get faster startup if you set this to false
      t.profile = 'default'
      t.rocv = true #add this line for coverage report
    end
    Cucumber::Rake::Task.new({:wip => 'db:test:prepare'}, 'Run features that are being worked on') do |t|
      t.binary = vendored_cucumber_bin
      t.fork = true # You may get faster startup if you set this to false
      t.profile = 'wip'
      t.rocv = true #add this line for coverage report
    end
    Cucumber::Rake::Task.new({:rerun => 'db:test:prepare'}, 'Record failing features and run only them if any exist') do |t|
      t.binary = vendored_cucumber_bin
      t.fork = true # You may get faster startup if you set this to false
      t.profile = 'rerun'
      t.rocv = true #add this line for coverage report
    end
</pre>


== Running ==
== Running ==

Revision as of 01:59, 21 March 2013

OSS E600

Writing Assignment 2

Work in progress. Due 3/20/2013

Introduction

There were three goals in the OSS E600 project <ref name='assignment'> http://courses.ncsu.edu/csc517/common/homework/OSS/expertiza.html</ref>

  1. Restructure the feature files for better organization. Feature folders like 'student' had few scenarios strung out between many files. Reconsolidate the files to make them more useful.
  2. Determine a gem that will generate code coverage reports. It needs to work with Ruby 1.8.7 and Rails 2.
  3. Use the coverage tool to find areas that need the most improvement. Then create new tests targeting those areas to increase coverage.

Setup

Setting up the coverage environment is very similar to using cucumber. The majority of the instructions in the old cucumber wiki still apply.<ref name='old_wiki'>http://wiki.expertiza.ncsu.edu/index.php?title=Using_Cucumber_with_Expertiza</ref>

gem install relevance-rcov
bundle install
rake db:create
rake db:test:prepare

Modify the file ./lib/task/cucumber.rake. Add line "t.rcov=true" below each of the three t.profile lines.

    Cucumber::Rake::Task.new({:ok => 'db:test:prepare'}, 'Run features that should pass') do |t|
      t.binary = vendored_cucumber_bin # If nil, the gem's binary is used.
      t.fork = true # You may get faster startup if you set this to false
      t.profile = 'default'
      t.rocv = true #add this line for coverage report
    end

    Cucumber::Rake::Task.new({:wip => 'db:test:prepare'}, 'Run features that are being worked on') do |t|
      t.binary = vendored_cucumber_bin
      t.fork = true # You may get faster startup if you set this to false
      t.profile = 'wip'
      t.rocv = true #add this line for coverage report
    end

    Cucumber::Rake::Task.new({:rerun => 'db:test:prepare'}, 'Record failing features and run only them if any exist') do |t|
      t.binary = vendored_cucumber_bin
      t.fork = true # You may get faster startup if you set this to false
      t.profile = 'rerun'
      t.rocv = true #add this line for coverage report
    end

Running

Design Patterns

Conclusion

References

<references/>