Solr onfitnesse learningfromberlinbuzzwords
-
Upload
dmitry-kan -
Category
Technology
-
view
512 -
download
0
Transcript of Solr onfitnesse learningfromberlinbuzzwords
Solr on FitNesseLearning from Berlin Buzzwords'13
by @dmitrykan
What is FitNesse
● The fully integrated standalone wiki and acceptance testing framework
● Collaboration tool with very low entry● Test tool: wiki pages are run as tests● Open source● Has a number of plugins for: security, dependency
management, ruby/php/python/c/c++/objective c/.net/coffee script ...
Who speaks the Solr language?
Main components
● FitNesse Wiki● FitServer● Fit: Framework for Integrated Tests● Slim
(almost) Natural Language
Fixture code
Architecture
Solr on FitNesse: health checkpublic class SolrShardsFixture extends ColumnFixture {
private String shardURL; private String shardName;
public boolean isShardUp() { if (shardURL == null || shardURL.isEmpty()) throw new RuntimeException("shardURL url is empty"); try { SolrServer serverTopic = new CommonsHttpSolrServer(shardURL); SolrPingResponse solrPingResponse = serverTopic.ping();
if (solrPingResponse.getStatus() == 0) return true;
} catch (MalformedURLException e) { throw new RuntimeException("Failed to create SolrServer instance: " + e.getMessage()); } catch (IOException e) { throw new RuntimeException("Failed to ping the SolrServer instance: " + e.getMessage()); } catch (SolrServerException e) { throw new RuntimeException(e.getMessage()); } return false; }
public void setShardURL(String shardURL) { this.shardURL = shardURL; }
public void setShardName(String shardName) { this.shardName = shardName; }}
Solr health check
Summary
● Very easy to start● Tests written in (almost) natural language: for
non-technical team members● Good to combine xUnit with FitNesse● Applicable for Big Data projects● Drives project towards TDD
Links
● FitNesse: www.fitnesse.org ● Apache Solr: www.lucene.apache.org/solr ● Solr on FitNesse: http://bit.ly/12AxvME ● Some slides from: http://slidesha.re/18NWcc7● Berlin Buzzwords: http://berlinbuzzwords.de