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

browser: add browser based test #506

Merged
merged 6 commits into from Nov 8, 2023
Merged

browser: add browser based test #506

merged 6 commits into from Nov 8, 2023

Conversation

mmatczuk
Copy link
Contributor

@mmatczuk mmatczuk commented Nov 7, 2023

This test allows to generate real load coming from a browser. At the moment it only supports FireFox but can be easily extended with other browsers.

@mmatczuk
Copy link
Contributor Author

mmatczuk commented Nov 7, 2023

I move that and local to testing. The e2e tests I left in the root. It feels like testing is all the manual inspection tools should go.

browser/Makefile Outdated Show resolved Hide resolved
@Choraden
Copy link
Contributor

Choraden commented Nov 7, 2023

@mmatczuk this is super cool!

Unfortunately, the script won't end for me. All browsers are long gone, forwarder does not have any open connections, yet the process lives on:

make                                                                                    
pip install -r requirements.txt
Requirement already satisfied: greenlet==3.0.0 in ./venv/lib/python3.11/site-packages (from -r requirements.txt (line 1)) (3.0.0)
Requirement already satisfied: playwright==1.39.0 in ./venv/lib/python3.11/site-packages (from -r requirements.txt (line 2)) (1.39.0)
Requirement already satisfied: pyee==11.0.1 in ./venv/lib/python3.11/site-packages (from -r requirements.txt (line 3)) (11.0.1)
Requirement already satisfied: typing_extensions==4.8.0 in ./venv/lib/python3.11/site-packages (from -r requirements.txt (line 4)) (4.8.0)
playwright install Firefox

@mmatczuk
Copy link
Contributor Author

mmatczuk commented Nov 7, 2023

It turns its silently fails on exception and hangs.
I added bunch of improvements, PTAL @Choraden.

@mmatczuk
Copy link
Contributor Author

mmatczuk commented Nov 7, 2023

Nah it's still not good, I think I'd rewrite it in sync mode.

@mmatczuk mmatczuk force-pushed the mmt/browser-test branch 2 times, most recently from 4de3411 to 40ec6e6 Compare November 8, 2023 12:15
@mmatczuk
Copy link
Contributor Author

mmatczuk commented Nov 8, 2023

@Choraden PTAL

This test allows to generate real load coming from a browser.
At the moment it only supports FireFox but can be easily extended with other browsers.
@Choraden
Copy link
Contributor

Choraden commented Nov 8, 2023

Foxnews and wsj time out waiting, however in the browser it looks ok. I don't know if this has something to do with forwarder or the testing tool itself. I don't see any disturbing logs in forwarder though.

@Choraden
Copy link
Contributor

Choraden commented Nov 8, 2023

LGTM, good job @mmatczuk

@mmatczuk
Copy link
Contributor Author

mmatczuk commented Nov 8, 2023

Maybe they should be "talkative"

@Choraden
Copy link
Contributor

Choraden commented Nov 8, 2023

Maybe they should be "talkative"

It did help me with wsj. Foxnews still times out.

Add random clicking and typing after page is loaded for a minute.
It is based on https://github.com/marmelab/gremlins.js on most pages it works beyond GDPR cookie div.
This Prometheus instance can work with Forwarder running natively.
It listens to localhost:10000 for metrics.
@mmatczuk mmatczuk merged commit 4441672 into main Nov 8, 2023
4 checks passed
@mmatczuk mmatczuk deleted the mmt/browser-test branch November 8, 2023 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants