News for hackers. Stuff that matters.
Re:Show HN: Chromeless – Headless Chrome Automation on AWS L... by victorhooi on Wednesday July 26, 2017 @03:46PM (#14859549)
So to clarify - this is basically a Node.JS wrapper around Chrome headless, right? =_)

Seems pretty awesome.

My use case is to take screenshots of various pages - the docs don't mention the default viewport dimensions, btw.

Re:Show HN: Chromeless – Headless Chrome Automation on AWS L... by schickling on Wednesday July 26, 2017 @03:47PM (#14859560)
Yes exactly + this can run (in parallel) on AWS Lambda, so you don't need to worry about provisioning & running servers. That's actually the part I'm most excited about :)
Re:Show HN: Chromeless – Headless Chrome Automation on AWS L... by purvis on Wednesday July 26, 2017 @03:58PM (#14859676)
It's parallel because AWS Lambda is inherently parallel? Or are you referring to within JavaScript?
Re:Show HN: Chromeless – Headless Chrome Automation on AWS L... by adieuadieu on Wednesday July 26, 2017 @04:01PM (#14859713)
Parallel in that you can invoke many Lambda functions at the same time and have them run independently of each other
Re:Show HN: Chromeless – Headless Chrome Automation on AWS L... by dlisboa on Wednesday July 26, 2017 @04:13PM (#14859824)
So basically if I had 200 automations I could run them on 200 lambdas and have them finish by the time the slowest one finishes? That pretty awesome, specially for testing. For many cases this would also fall under the free tier since it not that many requests/usage...it kinda seems too good to be true. Am I missing something?
Re:Show HN: Chromeless – Headless Chrome Automation on AWS L... by bald on Wednesday July 26, 2017 @05:08PM (#14860370)
> For many cases this would also fall under the free tier since it not that many requests/usage...it kinda seems too good to be true

(since I've ran into the same trap a couple of weeks ago and ended up with USD 650 of unanticipated charges): the free Lambda tier includes

* 1M requests

* 400k GB-seconds

--> the GBsec can be a serious bottleneck. Imagine you're running each Lambda instance with 512MB RAM and each instance takes 2 mins to complete your test. This means that one Lambda instance is ~61.5 GBsec, meaning you can execute ~6,500 of these instances per month to remain in the free tier.

Depending on how extensive your tests are/how often you run them, you might run out of free GBsec well before you'd run out of the requests quota.

Re:Show HN: Chromeless – Headless Chrome Automation on AWS L... by penagwin on Thursday July 27, 2017 @12:47AM (#14862781)
Granted that means running ~216 instances per day, or 9 instances per hour (taking 18 minutes per hour to run total). Now you're right, if you're running a screenshot service then this will kill you real fast.

However assuming a 8 hour work day you then get ~27 instances per hour. Each test takes two minutes to run, so for a single user testing, assuming a code - test - code - test routine, you'd be able to do that nearly continuously, for 8 hours a day, every day of the month (no weekends or days off). Seems safe to assume that wouldn't occur.

Re:Show HN: Chromeless – Headless Chrome Automation on AWS L... by adieuadieu on Wednesday July 26, 2017 @04:18PM (#14859866)
Yep. That's one of the main reasons why we're so excited about this project!
Re:Show HN: Chromeless – Headless Chrome Automation on AWS L... by MoOmer on Wednesday July 26, 2017 @06:05PM (#14860798)
Haven't had time to read the source yet, how are the lambda headless chrome reliability issues dealt with? Is it a different chrome build than serverless-chrome?
Re:Show HN: Chromeless – Headless Chrome Automation on AWS L... by adieuadieu on Wednesday July 26, 2017 @06:19PM (#14860894)
For now, we're using the workaround proposed here: https://github.com/adieuadieu/serverless-chrome/issues/41#is...

The Chromeless Proxy service uses the @serverless-chrome/lambda package as is. Same build.

Re:Show HN: Chromeless – Headless Chrome Automation on AWS L... by schickling on Wednesday July 26, 2017 @04:16PM (#14859854)
Nope, welcome to the serverless future! :)
Re:Show HN: Chromeless – Headless Chrome Automation on AWS L... by dlisboa on Wednesday July 26, 2017 @04:28PM (#14859979)
You guys should put up an example on how to convert a (small) test suit to use it, like you said you did in your top comment. The examples you have are cool but don't really help visualize that parallelism gain.
Re:Show HN: Chromeless – Headless Chrome Automation on AWS L... by schickling on Wednesday July 26, 2017 @04:33PM (#14860037)
Sounds like a great idea. Would you mind creating an issue here so we can track this? https://github.com/graphcool/chromeless/issues
Re:Show HN: Chromeless – Headless Chrome Automation on AWS L... by dlisboa on Wednesday July 26, 2017 @05:00PM (#14860317)
Done.
Re:Show HN: Chromeless – Headless Chrome Automation on AWS L... by kensoh on Thursday July 27, 2017 @07:01PM (#14870492)
There's a section in the readme which I'm not sure of - "Running integration Tests for example is much faster." I guess that gains is from the parallel executions. But for the integration testings, there is still work to be done to make a central controller / runner to distribute various tests to different Lambda instances, correct? If that's the case, is loadtesting using Chromeless be another use case? Just initiate in parallel and blast the app infrastructure. It won't be efficient in terms of costs as using non-real browsers but this is probably as realistic as simulating real users load through real browsers.
Re:Show HN: Chromeless – Headless Chrome Automation on AWS L... by roughcoder on Wednesday July 26, 2017 @03:51PM (#14859598)
agreed no default is mentioned but you can declare with `await chromeless.viewport(1024, 800)`
Re:Show HN: Chromeless – Headless Chrome Automation on AWS L... by sorenbs on Thursday July 27, 2017 @06:21AM (#14863991)
That seems to break for some reason, but you can set it like this:

https://chromeless.netlify.com/#src=const%20chromeless%20=%2...