Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow testing against a deployed site #28

Closed
cburgmer opened this issue Apr 3, 2013 · 5 comments
Closed

Allow testing against a deployed site #28

cburgmer opened this issue Apr 3, 2013 · 5 comments

Comments

@cburgmer
Copy link
Owner

cburgmer commented Apr 3, 2013

In some instances we might not be able to integrate testing into the application and run tests against a local code base. The same origin restriction doesn't allow us to test against a deployed website served from a different origin.

@cburgmer
Copy link
Owner Author

cburgmer commented Apr 4, 2013

A quick solution is to run that through a CORS proxy like https://github.com/cburgmer/tinycors.

@cburgmer
Copy link
Owner Author

cburgmer commented Apr 8, 2013

Latest commits including ae2864d tackle this by routing all pages under test through a backend.

TODO:

  • Support URLs without host part together with full ones
  • Remove script elements once inlined to work around duplicate call
  • Report failed resources
  • Add caching parameters
  • Sandbox JS execution in backend
  • Add a bit of user niceness to server

@zeroxme
Copy link

zeroxme commented Apr 24, 2014

+1

@cburgmer
Copy link
Owner Author

Here's an idea how to do it right now:

  1. Grab fzaninotto/screenshot-as-a-service and start the service

  2. Register a page like that:

     csscritic.add('http://localhost:3000/?url=https://github.com');

    This should get you started. I'd be happy about feedback, and willing to add some more functionality around that, although this is currently not my main area of focus.

@cburgmer
Copy link
Owner Author

cburgmer commented Apr 1, 2015

CSS Critic moves towards providing tests around a style guide. This aims for small components instead of full blown pages.

Having said that, CSS Critic loads both HTML and just simple images from any given URL as long as it's allowed to access those resources following the same origin policy. Solutions mentioned above will provide flexibility around accessing more complex resources.

@cburgmer cburgmer closed this as completed Apr 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants