view · edit · sidebar · attach · print · history

20110216-testcases-oddb_org

<< Masa.20110217-testcases-oddbapp_rb-oddb_org | 2011 | Masa.20110215-testcases-ext-oddb_org >>


  1. Merge two suite.rb in test and ext directories
  2. Update test-cases of readonly module
  3. Update test-cases for oddbapp.rb

Goal/Estimate
  • update ext test-cases / 50%
Milestones
  1. merge suite.rb
Summary
Commits

Merge two suite.rb in test and ext directories

Memo

  • The total coverage of rcov may include not only the source code of under oddb.org but the other Ruby libraries

Commit

Update test-cases of readonly module

Memo

  • There is no test-casees
  • 'readonlyd' does not work
masa@masa ~/ywesee/oddb.org/ext/readonly $ bin/readonlyd 
/usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- oddb/util/multilingual (LoadError)
        from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /home/masa/ywesee/oddb.org/src/remote/galenic_group.rb:5
        from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /home/masa/ywesee/oddb.org/src/remote/galenic_form.rb:5
        from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /home/masa/ywesee/oddb.org/src/remote/sequence.rb:5
        from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /home/masa/ywesee/oddb.org/src/remote/package.rb:5
        from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /home/masa/ywesee/oddb.org/ext/readonly/src/readonly_server.rb:2
        from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from bin/readonlyd:10

Note

First test_case file (skeleton code)

#!/usr/bin/env ruby
# ODDB::TestReadonlyServer -- oddb.org/ext -- 16.02.2011 -- mhatakeyama@ywesee.com

$: << File.expand_path('../src', File.dirname(__FILE__))
$: << File.expand_path("../../..", File.dirname(__FILE__))
$: << File.expand_path("../../../src", File.dirname(__FILE__))

require 'test/unit'
require 'flexmock'
require 'readonly_server'

module ODDB
  class TestReadonlyServer < Test::Unit::TestCase
    def test_test
      assert(false)
    end
  end
end

Result

masa@masa ~/ywesee/oddb.org/ext/readonly/test $ ruby test_readonly_server.rb 
Loaded suite test_readonly_server
Started
F
Finished in 0.000492 seconds.

  1) Failure:
test_test(ODDB::TestReadonlyServer) [test_readonly_server.rb:15]:
<false> is not true.

1 tests, 1 assertions, 1 failures, 0 errors

Next

  • Make a test-case for each method one by one

Update test-cases for oddbapp.rb

Memo

  • Total coverage: 36.43%
  • Start with simpler test-cases

Commit

view · edit · sidebar · attach · print · history
Page last modified on May 09, 2012, at 02:16 PM