Writing faster WebDriver tests
Some day ago I met with a friend and had nice chat about testing. Eventually we came to a topic about Selenium. He’s been using Selenium mostly for simple test cases, but now he was thinking of using it to test some reporting functionality. His concern was if Selenium is actually the right tool to help him with that. At that point I said that Selenium is the best free tool for functional testing of web apps that we have now, but it’s another thing how good it actually is....
Team Foundation Server Express
Of all the new developer tools and products that Microsoft launched this fall, Team Foundation Server Express got most of my attention. The fact that it’s free and that it comes with reasonable limitations compared to full version, shows that Microsoft is really dedicated to making it’s platform stronger. This blog post won’t cover all the features that are included or not, I’ll just focus on those that are most interesting....
Disabling Google Ads
Some time ago I was doing some Selenium Webdriver tests for a website with Google Ads. For QA environment the ads were disabled through some website configuration, but for Staging environment everything was set up as on Live, and so the ads were enabled. However, this caused some problems when running Webdriver tests. What happened is that on some pages the Webdriver would timeout because the requests made by Google Ads scripts were taking too long....
Switching to English
It’s been more than a year and a half since I started this blog and as every blog author, I haven’t written as much as I wanted, but this has been a great year so far, with a lot of great things happening at work and in my personal life and I’m not a bit sorry for not having more time to blog. So this blog post won’t be about me promising that I’ll blog more (or less :) it’s an announcement that all future posts will be in English....
Application pool timeout usled neaktivnosti web aplikacije
Ukoliko sajt nema posetu duže od 20 minuta, application pool će se ugasiti i osloboditi sistemske resurse. Kada sledeći zahtev dođe, IIS će automatski startovati application pool i poslati traženu starnicu. Ovo je odoličan način da se čuvaju resursi, ali to takođe znači da prvi zahtev, onaj koji dovodi do startovanja aplikacije, je vrlo spor. Spor je zato što proces mora da se startuje, učita sve potrebne biblioteke, izvrši Application_Start metodu i na kraju procesira zahtev....
GZip i shared hosting
Upotreba kompresije je svakako jedna od tehnika optimizacije web aplikacija. Ukoliko nemamo kontrolu nad IIS konfiguracijom, ili nemamo dovoljno prava, kao npr. u slučaju shared hosting rešenja, možemo uključiti GZip kompresiju kroz web.config same web aplikacije. Sve što je potrebno jeste dodati ovaj node u web.config fajl i to će uključiti GZip kompresiju za datu web aplikaciju. <system.webServer> <httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files"> <scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll"/> <dynamicTypes> <add mimeType="text/*" enabled="true"/> <add mimeType="application/javascript" enabled="true"/> <add mimeType="*/*" enabled="false"/> </dynamicTypes> <staticTypes> <add mimeType="text/*" enabled="true"/> <add mimeType="application/javascript" enabled="true"/> <add mimeType="*/*" enabled="false"/> </staticTypes> </httpCompression> <urlCompression doStaticCompression="true" doDynamicCompression="true"/> </system....
Selenium 2 WebDriver injection
Selenium 2 WebDriver ima podršku za nekoliko browser-a: FireFox 3.6 - 10 Internet Explorer 7 - 9 Opera 8 - 9 Chrome itd. Kako svi drajver implementiraju IWebDriver interfejs, prirodno je da se testovi pišu korišćenjem ovog interfejsa a ne konkretnog drajvera. Na taj način testovi će raditi sa bilo kojim internet pretraživačem. Međutim, tu se nameće problem kako instancirati konkretan drajver. Podešavanje Unity framework-a Konfigurisanje DI kontejnera, odnosno registrovanje tipova možemo definisati u baznoj test klasi....
Selenium Dynamic Page Object
O Page Object klasama sam pisao ranije u postu Page Object Pattern, ovaj post ima za cilj da prikaže kako se može napraviti dinamička Page Object klasa. Zahvaljujući novinama koje je .Net 4.0 doneo sa sobom, pre svega dinamički tip, moguće je jednostavan način implementirati dinamički Page Object. Dynamic Page Object Sve što treba jeste da naša Page Object klasa nasledi DynamicObject i da napišemo override metode TryGetMember: public class DynamicPageObject : DynamicObject { private readonly IWebDriver driver; public DynamicPageObject(IWebDriver driver) { this....
Baseless merge
Cilj ovog članka jeste da objasni šta je baseless merge i kako sprovesti takav merge. Razlog zašto pišem baš o ovome proizliazi i toga da sam više puta bio u situaciji da mi se developeri, pa čak i oni sa više iskustva, obraćaju sa istim problemom: kako izvršiti spajanje grana koje nisu u direktnoj (roditelj-dete) vezi. Šta je zapravo baseless merge? Baseless merge je proces spajanja (merging) dva fajla (ili celih foldera) koji se nalaze na granama koje nisu u direktnoj vezi....
Skrivanje interfejsa, klasa i metoda
Sigurno ste nekom prilikom napravili biblioteku na koju ste bili ponosni, a onda totalno razočarani pretrpanim IntelliSense-om kada pokušate da je koristite. Veliki broj interfejsa, klasa ili metoda čine vašu biblioteku teškom za korišćenje. Pravilnom upotrebom modifikatora pristupa ovaj problem se može samo delimično sanirati, jer neki tipovi jednostavno moraju biti javni. Ovaj problem je naročito očigledan ako ste pravili biblioteku koja izlaže fluent API. Na svu sreću postoji jedan atribut u okviru System....