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

Save offline test #30

Open
anvaka opened this issue Jul 10, 2020 · 4 comments
Open

Save offline test #30

anvaka opened this issue Jul 10, 2020 · 4 comments

Comments

@anvaka
Copy link

anvaka commented Jul 10, 2020

I love the simplicity of the user interface - thank you for developing this.

I was wondering if it would be possible to "export" tests into standalone html file, so that it can be executed locally or saved into separate git repository?

@psiho
Copy link
Owner

psiho commented Jul 10, 2020

Thx for your comment!
As for local run export, I'm not sure I get it, what use it is for. I mean, your tests run locally already. JSBench.me is a single-page-app in React with benchmark.js in the background (sandboxed frame). So tests run locally. You need net only to login and load tests from database, but technically, you can load the app, disconnect from the net and just type/run tests locally offline. As long as you don't use save, update, login and vote functionality that connect to database.

Sharing tests with others is also easier with sending a link than a zip file with html. In future versions, results from different users/browsers will be stored and compared this way.

I'll need more about your use case to consider it for future versions. v1 is now finished and will be puclished in a day or two, so no new features for this release.

@anvaka
Copy link
Author

anvaka commented Jul 10, 2020

It is similar to https://jsbin.com/ - you can download html with your code, adjust it and upload to internal network (e.g. if it uses sensitive data).

Also adds extra level of redundancy if jsbench.me would ever go out from the internet. I hope it's not, but I've seen a few other popular websites being overwhelmed by malicious users and going out

@psiho
Copy link
Owner

psiho commented Jul 10, 2020

I'm more of a jsfiddle guy :) But just went to jsbin and export seems to be broken.

Anyway, I get it... private/sensitive data is one reason (although making tests "private" is half-done already). I'll put it on the list. I guess some voting on new features will be done. List is growing lately.

@psiho
Copy link
Owner

psiho commented Jul 11, 2020

In the absence of JSbin functionality to look at, can you tell me more about your ideal scenario here. I'm curios. I'm not sure what exactly JSBin downloads. It's really easy to download JSON formatted test properties for some kind of local backup, but then this format would not be run localy on it's own.

Second option would be to export HTML file with embedded (links to) benchmark.js and embedded Test Suite data. but without any visual editor. Html file would run on open and possibly just output results to console or screen.

Option to make complete editor/runner in export would be too complex for now. Basically I'd need to maintain two versions of the code, one local with no save/login/vote functionality and the other one public. Not happy with doing this much work, especially because (a side note!) one of the biggest reasons for v1 rewrite was to make it Open Source. 90% of work there is done, so very soon you'll be able to install your local copy and do with it whatever you want. I've included AWS CloudFormation now, together with AWS Sam templates in the source code and spent a lot of time on build&deploy scripts so with only a single command you will be able to create your own complete AWS infrastructure and deploy to it. UserPools, DynamoDB tables, Lambda functions, roles... almost everything is created automagically. You only need to change configs with your AWS credentials, create sam-cli role and setup verified AWS SES email for email notifications.

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