Get help with testing, discuss unit testing strategies etc.


Post by draines »

Is it possible to write a Siesta test that logs in with a certificate?
We are planning to run the tests using the WebDriver. I know that this is possible (or partially possible) in Selenium

The tests we need to automate involve multiple users. Our nightly build environment is configured to use username / passwords, but I'm trying to understand if it would be possible to use Siesta to run tests on our government customer's "official" test site, which requires a certificate login, and has multiple test accounts that we have certificates for.

I'm sorry if this has been addressed elsewhere.

VR,
David

Post by nickolay »

How do you mean "login with a certificate"? Any links on this functionality in Selenium?

Post by draines »

Sorry for the late reply.

Its also called "SSL mutual authentication", when a website would run over HTTPS, and require that the client web browser provide a certificate of its own. The client certificate can be the basis of the users's identity on the site. Its not common in commercial, user facing applications, but can be common in (US) government websites.

https://en.wikipedia.org/wiki/Mutual_authentication

Siesta Test is pretty clearly the best testing tool for ExtJS applications, but I'm wondering if we could use it to drive tests on our customer's official "test / staging" environment (which requires client certificate authentication to login), or if Siesta Test could only be used on our own nightly build servers (which are configured for username / password logins)

There is some ability to do it in Selenium:
https://stackoverflow.com/questions/108 ... um-testing

I was wondering if you guys knew of Siesta users doing anything like this.
As we dive into Siesta, we're still struggling to understand the relationship between the Siesta framework, and Webdriver, to know if such a thing could be done in Siesta.

VR,
David

Post by nickolay »

If I'm correct, the certificate is installed manually, in the browser profile. IIRC webdriver allows to choose the profile for firefox and chrome.

Siesta supports specifying the profile to use for firefox using "--firefox-profile" switch. You can try to run your tests with that switch, pointing to a location of the FF profile you are using for manual browsing.

The similar switch for Chrome is not available right now, but should be easy to add.

Post by draines »

So the concern is that the scenarios we're trying to test require us to log in and out with multiple different accounts (to simulate different users with different roles acting on a workflow).

There's no direct way in Selenium, but since Selenium is (often) driven by client-side Java, some people have luck with a library called "AutoIt". Selenium can't directly access the browser's security dialogs, but AutoIt can:

https://sqa.stackexchange.com/questions ... ity-dialog


Is any such workaround available with Siesta?

Post by nickolay »

Hm.. The closest we can get is to specify different browser profile for different tests / groups of tests (which is not available right now, but should be easy to implement). Does that solves your use case? You'll still be limited to single certificate during the test.

Post by mth3r »

We are actually looking to do the same sort of test. Has there been any movement on this front or has anyone found a solution?

Post by nickolay »

The proposed solution is to use custom browser profile with required certificate built-in. It is already supported for Firefox so you can try it. Support for Chrome can be added on request.

Post Reply