Skip to content

(Relevancy) tests against the Stanford SearchWorks Solr Index, using rspec-solr and rsolr gems.

License

Notifications You must be signed in to change notification settings

sul-dlss/sw_index_tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SearchWorks Solr Index Tests

A ruby “application” for testing the Stanford University Libraries SearchWorks Solr index, using rspec-solr and rsolr gems.

The main reason this is in publicly accessible web space is to allow it to serve as an exemplar for folks who want to use rspec-solr or who want to figure out a way to automate testing searches against a Solr index.

Usage

If you wish to create a similar app for YOUR Solr index, you can fork this project or do something like the following:

Copy the following files:

  • Rakefile

  • Gemfile

  • spec/spec_helper.rb

Choose a way to pass your solr baseurl to the app

Use a command line argument:

rake passing URL=http://your_solr_baseurl

Use a config file

copy config/solr.yml from this project

If you wish to keep your solr url out of a remote git repo, you can do this:

git update-index --assume-unchanged config/solr.yml
NOTE: in spec/spec_helper.rb, line 10 or shows the default expected yml group is "test"

Write specs for YOUR Solr index!

There are lots of examples in the spec folder.

See rspec-solr Gem documentation for the full syntax. Documentation around here somewhere:

Contribute helper methods here or to rspec-solr.

Contributing

  1. Fork it

  2. Create your feature branch (‘git checkout -b my-new-feature`)

  3. Commit your changes (‘git commit -am ’Added some feature’‘)

  4. Push to the branch (‘git push origin my-new-feature`)

  5. Create new Pull Request

About

(Relevancy) tests against the Stanford SearchWorks Solr Index, using rspec-solr and rsolr gems.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages