aerokube / ggr

A lightweight load balancer used to create big Selenium clusters
https://aerokube.com/ggr/latest/
Apache License 2.0
314 stars 74 forks source link

Is it possible to route the same webdriver request to multiple containers? #287

Closed mohanraj-r closed 4 years ago

mohanraj-r commented 5 years ago

I think Selenoid/GGR are awesome projects and I would be more than happy to work with you to contribute the necessary code to this project!

vania-pooh commented 5 years ago

@mohanraj-r 1) Where is the issue to create two parallel Selenium sessions: one with standard page representation and the second one - with accessibility tests? 2) Why do we need to run a shadow container? 3) Selenoid is a test execution server - it does not store any information about test execution results. For this purpose - consider using a powerful report, e.g. Allure Framework. 4) Regarding plugin architecture - without a reason we try to not overcomplicate Selenoid. Our approach is avoiding to add code when not really needed. Otherwise Selenoid will be buggy as original Selenium server.

aandryashin commented 5 years ago

Mohan, please take a look at:

https://github.com/aerokube/selenoid-images/tree/master/selenium/external-host

You can create custom container and implement any logic you want, for ex request replication, and plug that container to selenoid. In that case selenoid stays the same and all custom logic goes to container...

сб, 14 сент. 2019 г., 7:19 Ivan Krutov notifications@github.com:

@mohanraj-r https://github.com/mohanraj-r

  1. Where is the issue to create two parallel Selenium sessions: one with standard page representation and the second one - with accessibility tests?
  2. Why do we need to run a shadow container?
  3. Selenoid is a test execution server - it does not store any information about test execution results. For this purpose - consider using a powerful report, e.g. Allure Framework https://github.com/allure-framework.
  4. Regarding plugin architecture - without a reason we try to not overcomplicate Selenoid. Our approach is avoiding to add code when not really needed. Otherwise Selenoid will be buggy as original Selenium server.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/aerokube/ggr/issues/287?email_source=notifications&email_token=AAKY23K72TGLBGW4EJ62ERLQJRQ4ZA5CNFSM4IWU7FY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6WT37A#issuecomment-531447292, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKY23PXJ2GAKU7K52ICI6LQJRQ4ZANCNFSM4IWU7FYQ .

mohanraj-r commented 5 years ago

Thanks @aandryashin @vania-pooh

What I am looking is to transparently proxy all webdriver commands for a session into another container - so that the original container runs the UI test whereas the shadow copy container executes the same steps but does so in a different context (e.g. different browser, runs additional checks in addition on the page etc).

I see that there is some logic in selenoid that does something similar - selenoid/main.go at master · aerokube/selenoid

var seleniumPaths = struct {
    CreateSession, ProxySession string
}{
    CreateSession: "/session",
    ProxySession:  "/session/",
}

If this doesn't sound like a good fit for ggr/selenoid, please feel free to close the issue. I can maybe ping again once I have some code to reassess if there is any fit.

aandryashin commented 5 years ago

The external-host image does similar thing, but proxies to external host:

https://github.com/aerokube/selenoid-images/blob/master/selenium/external-host/rproxy/main.go

You can implement your logic and plug image to selenoid...

чт, 19 сент. 2019 г., 6:00 Mohan Raj Rajamanickam <notifications@github.com

:

Thanks @aandryashin https://github.com/aandryashin @vania-pooh https://github.com/vania-pooh

What I am looking is to transparently proxy all webdriver commands for a session into another container - so that the original container runs the UI test whereas the shadow copy container executes the same steps but does so in a different context (e.g. different browser, runs additional checks in addition on the page etc).

I see that there is some logic in selenoid that does something similar - selenoid/main.go at master · aerokube/selenoid https://github.com/aerokube/selenoid/blob/master/main.go#L236

var seleniumPaths = struct {

CreateSession, ProxySession string

}{

CreateSession: "/session",

ProxySession: "/session/",

}

If this doesn't sound like a good fit for ggr/selenoid, please feel free to close the issue. I can maybe ping again once I have some code to reassess if there is any fit.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aerokube/ggr/issues/287?email_source=notifications&email_token=AAKY23LO6MIDGAJCBDHKKLDQKLTONA5CNFSM4IWU7FY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7CBPYA#issuecomment-532944864, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKY23KR5L76VCNBSPK72DLQKLTONANCNFSM4IWU7FYQ .

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.