Comments (10)
Thanks for this. tests_controller.rb:20 points to https://github.com/wearefriday/spectre/blob/master/app/controllers/tests_controller.rb#L20 which suggests a problem with cropping. Does it work if you don't send crop?
from spectre.
Thanks for the prompt reply , I'll work on the suggestion today .
Idea is to add a java client on your repo to use this great tool.
from spectre.
@nickdunn I removed the parameter crop_area
and executed the test , below are the logs
I, [2017-11-08T14:44:03.736049 #14] INFO -- : Completed 200 OK in 222ms (Views: 0.1ms | ActiveRecord: 44.3ms) I, [2017-11-08T14:44:04.687910 #14] INFO -- : Started POST "/tests" for 172.18.0.1 at 2017-11-08 14:44:04 +0000 I, [2017-11-08T14:44:04.690569 #14] INFO -- : Processing by TestsController#create as HTML I, [2017-11-08T14:44:04.691017 #14] INFO -- : Parameters: {"test"=>{"run_id"=>"1", "name"=>"Homepage", "platform"=>"OSX", "browser"=>"Firefox", "size"=>"1289", "screenshot"=>{"path"=>"/var/folders/0v/9tqxsqpn38n64cwv8b6mdh9w3d7_zq/T/screenshot1422269543327271316.png"}, "source_url"=>"http://mysite.dev/"}} D, [2017-11-08T14:44:04.702738 #14] DEBUG -- : (0.4ms) BEGIN D, [2017-11-08T14:44:04.711394 #14] DEBUG -- : Run Load (0.3ms) SELECT "runs".* FROM "runs" WHERE "runs"."id" = $1 LIMIT 1 [["id", 1]] D, [2017-11-08T14:44:04.720079 #14] DEBUG -- : SQL (0.8ms) INSERT INTO "tests" ("name", "browser", "size", "run_id", "source_url", "diff", "pass", "fuzz_level", "highlight_colour", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["name", "Homepage"], ["browser", "Firefox"], ["size", "1289"], ["run_id", 1], ["source_url", "http://mysite.dev/"], ["diff", 0.0], ["pass", "f"], ["fuzz_level", "30%"], ["highlight_colour", "ff0000"], ["created_at", "2017-11-08 14:44:04.717885"], ["updated_at", "2017-11-08 14:44:04.717885"]] D, [2017-11-08T14:44:04.727717 #14] DEBUG -- : Suite Load (0.3ms) SELECT "suites".* FROM "suites" WHERE "suites"."id" = $1 LIMIT 1 [["id", 1]] D, [2017-11-08T14:44:04.729587 #14] DEBUG -- : Project Load (0.3ms) SELECT "projects".* FROM "projects" WHERE "projects"."id" = $1 LIMIT 1 [["id", 1]] D, [2017-11-08T14:44:04.732884 #14] DEBUG -- : SQL (0.5ms) UPDATE "tests" SET "name" = $1, "browser" = $2, "size" = $3, "run_id" = $4, "source_url" = $5, "diff" = $6, "pass" = $7, "fuzz_level" = $8, "highlight_colour" = $9, "created_at" = $10, "updated_at" = $11, "id" = $12, "key" = $13 WHERE "tests"."id" = $14 [["name", "Homepage"], ["browser", "Firefox"], ["size", "1289"], ["run_id", 1], ["source_url", "http://mysite.dev/"], ["diff", 0.0], ["pass", "f"], ["fuzz_level", "30%"], ["highlight_colour", "ff0000"], ["created_at", "2017-11-08 14:44:04.717885"], ["updated_at", "2017-11-08 14:44:04.717885"], ["id", 1], ["key", "praetorian-suitepx-homepage-firefox-1289"], ["id", 1]] D, [2017-11-08T14:44:04.748198 #14] DEBUG -- : (14.4ms) COMMIT D, [2017-11-08T14:44:04.753447 #14] DEBUG -- : Baseline Load (0.7ms) SELECT "baselines".* FROM "baselines" WHERE "baselines"."key" = $1 ORDER BY "baselines"."created_at" ASC LIMIT 1 [["key", "praetorian-suitepx-homepage-firefox-1289"]] D, [2017-11-08T14:44:04.754925 #14] DEBUG -- : (0.3ms) BEGIN D, [2017-11-08T14:44:04.757100 #14] DEBUG -- : SQL (0.4ms) UPDATE "tests" SET "screenshot_baseline_uid" = $1, "updated_at" = $2 WHERE "tests"."id" = $3 [["screenshot_baseline_uid", nil], ["updated_at", "2017-11-08 14:44:04.755768"], ["id", 1]] D, [2017-11-08T14:44:04.768461 #14] DEBUG -- : (10.7ms) COMMIT I, [2017-11-08T14:44:04.769535 #14] INFO -- : Completed 500 Internal Server Error in 78ms (ActiveRecord: 31.6ms) F, [2017-11-08T14:44:04.771079 #14] FATAL -- : NoMethodError (undefined method
path' for nil:NilClass):
app/models/screenshot_comparison.rb:43:in create_canvas' app/models/screenshot_comparison.rb:28:in
compare_images'
app/models/screenshot_comparison.rb:10:in initialize' app/controllers/tests_controller.rb:22:in
new'
app/controllers/tests_controller.rb:22:in `create'
`
from spectre.
@nickdunn have you had time to look into it ?
from spectre.
@nickdunn Please can you help us with this
This will be a great feature to increase the visibility of this solution , ill open source the client code once we complete the POC
from spectre.
I don't know, I'm afraid. I'm not in a position with any free time to be able to assist right now.
from spectre.
@nickdunn Ohh No Worries , Thanks for your time.
from spectre.
@punitbisht Could you please be so kind and post you Java client, I'm having similar problem and getting either 400 or 500
from spectre.
@punitbisht Could you please be so kind and post you Java client, I'm having similar problem and getting either 400 or 500
If you modify Spectre controller (1 line of code in text file) it will make your work a lot easier. At least in NodeJS. See my reply - #90 (comment)
from spectre.
Spectre hasn't seen active development for some time. Closing the issue, feel free to open at one of the forks.
Alternatively try a fork with active development:
from spectre.
Related Issues (20)
- Ignore element e.g. image carousel HOT 2
- Hangup under Mac OSx with Docker HOT 5
- gemini integration? HOT 1
- Is this project still being maintained? HOT 4
- Test various Mobile device and browser HOT 1
- ERROR: Service 'app' failed to build HOT 1
- DB Migration PostgreSQL 9.6 HOT 1
- docker network HOT 1
- Can't see past the previous 5 runs HOT 2
- Docker installation fails: HOT 1
- heroku failed deploy HOT 3
- Travis failing
- Docker Test run unable to find phantom HOT 2
- docker-compose up fails HOT 3
- Describe POST /test example parameters HOT 2
- Error while accessing Spectre application on browser HOT 2
- What means "fuzzLevel"? HOT 1
- Impossible to set screenshot size with width less than 500px HOT 1
- Good example of a working project? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spectre.