Skip to content

Commit

Permalink
fix the case name to show up
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Dec 1, 2020
1 parent 98b5b93 commit a67e185
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
8 changes: 4 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
agent_q (0.0.12)
agent_q (0.0.13)
capybara (~> 3.31, >= 3.31)
cuprite (~> 0.11, >= 0.11)
nokogiri (~> 1.10, >= 1.10.8)
Expand All @@ -11,7 +11,7 @@ GEM
specs:
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
capybara (3.33.0)
capybara (3.34.0)
addressable
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
Expand All @@ -33,11 +33,11 @@ GEM
mini_portile2 (2.4.0)
nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
public_suffix (4.0.5)
public_suffix (4.0.6)
rack (2.2.3)
rack-test (1.1.0)
rack (>= 1.0, < 3)
regexp_parser (1.7.1)
regexp_parser (1.8.2)
websocket-driver (0.7.3)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
Expand Down
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@

AgentQ lets you automate your test driven relevancy cases via [Quepid](http://www.quepid.com). Easily integrate testing your Solr or Elasticsearch search engine into your CI or Continuous Deployment pipeline. Be confident that you have highly relevant search results without the manual testing!

Run a Quepid case automatically from the command line by passing in a case number (`1139`) and the score threshold for deciding if your search results pass or fail (`10`):
Run a Quepid case automatically from the command line by passing in a case number (`4081`) and the score threshold for deciding if your search results pass or fail (`10`):

```sh
> agent_q 1139 10 [email protected] $QUEPID_PASSWORD http://app.quepid.com
> export QUEPID_PASSWORD=your_password
> agent_q 4081 10 [email protected] $QUEPID_PASSWORD http://app.quepid.com

Case o19s blog search (1139) scored 10.0, which meets the threshold of 10
Case o19s blog search (778) scored 10.0, which meets the threshold of 10
```

If the Q Score for the case meets the threshold, then AgentQ will return 0, otherwise it returns 1, which signifies to your CI system that there was a failure.
Expand All @@ -30,9 +31,13 @@ and then call AgentQ from CircleCI via this line in our `circle.yml` file:
test:
override:
- bundle exec jekyll build
- bundle exec agent_q 1139 75 $QUEPID_USER $QUEPID_PASSWORD http://app.quepid.com
- bundle exec agent_q 4081 10 $QUEPID_USER $QUEPID_PASSWORD http://app.quepid.com
```

## How to test the code

Just run the code locally via `./bin/agent_q`

## Updating the Gem

Read up on how to manage gems at https://guides.rubygems.org/make-your-own-gem/.
Expand All @@ -41,7 +46,7 @@ Read up on how to manage gems at https://guides.rubygems.org/make-your-own-gem/.
bundle install
gem build agent_q.gemspec
gem install ./agent_q-0.0.12.gem
agent_q 1139 10 [email protected] $QUEPID_PASSWORD http://app.quepid.com
agent_q 4081 10 [email protected] $QUEPID_PASSWORD http://app.quepid.com
```

To deploy to RubyGems:
Expand Down
4 changes: 2 additions & 2 deletions agent_q.gemspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Gem::Specification.new do |s|
s.name = 'agent_q'
s.version = '0.0.12'
s.date = '2020-08-11'
s.version = '0.0.13'
s.date = '2020-12-01'
s.summary = "Headless agent for test driven relevancy with Quepid.com"
s.description = "A ruby agent that wraps a head browser that runs a specific Quepid Case and returns if your relevancy score meets or falls below a threshold."
s.authors = ["Eric Pugh"]
Expand Down
2 changes: 1 addition & 1 deletion lib/agent_q.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def run
html = page.html
json = html[html.index('{')..html.rindex('}')]
case_details = JSON.parse(json)
case_name = case_details["caseName"]
case_name = case_details["case_name"]

if case_results['message']
puts "Error checking case #{@quepid_case}: #{case_results['message']}"
Expand Down

0 comments on commit a67e185

Please sign in to comment.