[Phpmyadmin-devel] Selenium Test Organisation

Mohamed Ashraf mohamed.ashraf.213 at gmail.com
Fri Aug 16 09:50:04 CEST 2013


On Friday, August 16, 2013 at 3:37 AM, adam wrote:
> Hi,
> > Hi,
> >  
> >  
> > On Tuesday, 13 August 2013 at 9:23 PM, adam wrote:
> >  
> > > Hi Aysush,
> > > > On Tuesday, 13 August 2013 at 2:24 PM, Michal Čihař wrote:
> > > > > Hi
> > > > > Dne Tue, 13 Aug 2013 14:07:52 +0530
> > > > > Ayush Chaudhary <ayushchd at gmail.com (mailto:ayushchd at gmail.com)> napsal(a):
> > > > > > I don't see any explicit provision, however, we could perhaps connect
> > > > > > manually to database and execute corresponding SQL queries to configure the
> > > > > > database before our tests. Does that sound ok? If yes, we use mysqli?
> > > > > >  
> > > > >  
> > > > > There is no option to use setUp method for that?
> > > > >  
> > > >  
> > > > These tests run just similar to other unit tests except that we can use Selenium web driver calls using phpunit. So yes, we can use setup method to connect to mysql and create tables, databases that we need for our tests.  
> > > >  
> > >  
> > > That will back to a problem I encountered when I made UT for DBI testing. For selenium case, we should setup database, using username, password to connect.
> > > but this can't be deploy easily to CI and other developers' dev box because *the username and password* is private data.
> > > please advise!
> > >  
> >  
> >  
> > True, but if we are to test the functionality of phpMyAdmin, there is no other way but to connect to an actual MySQL Server and execute queries there to setup tests or to verify test results.
> > >  
> >  
> >  
>  
>  
> Agree.  
> If we want to conenct to actual MySQL server, the username and password should be exposed.
> I saw your pull request about Selenium test case, I will add some cases from my side.  
>  
>  

>  
> thanks,
> Adam
>  
>  

Cant we use environment variables or doesnt php have access to those. When I needed sensitive data I either stored them in environment variables or in file not tracked by the repo that I include. In both of those situations custom login credentials can be set up on every installation of phpmyadmin where the tests should run.

The tests can just check for the existance of the file or variable otherwise disable the part of the test suite that depends on it.
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.  
> Download for free and get started troubleshooting in minutes.  
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
> _______________________________________________
> Phpmyadmin-devel mailing list
> Phpmyadmin-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
>  
>  


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20130816/7203bd41/attachment.html>


More information about the Developers mailing list