tag:blogger.com,1999:blog-49661917285900541842024-03-21T17:49:26.238-07:00Trek to Assuring Qualitytechphilohttp://www.blogger.com/profile/04687010390875983452noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-4966191728590054184.post-75913270853942772662012-07-26T08:41:00.000-07:002012-07-26T08:41:26.586-07:00Getting Eclipse to run Webdriver (with Java)<div dir="ltr" style="text-align: left;" trbidi="on">
1. Install Eclipse (from eclipse.org)<br />
(To work with eclipse in Java you will need the Java Developer Kit (JDK) - <a href="http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1637583.html">http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1637583.html</a> - uninstall previous version if there is one)<br />
2. In Eclipse:<br />
-> New Java Project<br />
-> On this screen give your java project a name ('webdriver')<br />
-> Finish<br />
3. Download webdriver (<a href="http://code.google.com/p/selenium/downloads/detail?name=selenium-java-2.25.0.zip&can=2&q=">http://code.google.com/p/selenium/downloads/detail?name=selenium-java-2.25.0.zip&can=2&q=</a> )<br />
4. Unzip the file<br />
5. Right click in the project in Package Explorer and choose Build Path --> Configure Build Path<br />
6. Click on Libraries tab<br />
7. Click 'Add Jar files' (or if you cant find your jar files 'add External Jar Files'<br />
8. Add all your selenium webdriver jars<br />
javadoc location is <em style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: Verdana, Tahoma, Arial, Geneva, sans-serif; font-size: 11px; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; margin: 0px; orphans: 2; outline: 0px; padding: 0px; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">http://selenium.googlecode.com/svn/trunk/docs/api/java/</em><br />
<em style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: Verdana, Tahoma, Arial, Geneva, sans-serif; font-size: 11px; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; margin: 0px; orphans: 2; outline: 0px; padding: 0px; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"></em>9. From there you can start using your Webdriver files</div>techphilohttp://www.blogger.com/profile/04687010390875983452noreply@blogger.com0tag:blogger.com,1999:blog-4966191728590054184.post-61076373202844702912012-02-20T08:45:00.000-08:002012-06-01T13:23:35.992-07:00Everything you need to setup Django on Ubuntu with Postgresql<div dir="ltr" style="text-align: left;" trbidi="on">
This is a very simple run down of everything I did from a basic Ubuntu 10.04 setup to get Django running on my server.<br />
<br />
<ol style="text-align: left;">
<li><pre lang="bash">sudo apt-get install apache2 </pre>
This will install apache on your server<br style="font-family: inherit;" /> <span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-family: inherit;">- The httpd service should automatically be started. You can test it by going to the IP of your server (localhost if it is on your computer) </span><br />
<br />
</span></li>
<li><pre class="screen"><span class="command">sudo apt-get install postgresql </span></pre>
This installs PostgresSQL 8.4.<br />
I chose to use PostgreSQL. You may use different types of databases for your setup.<br />
If you are not familiar with Postgres, please visit www.postgresql.org for more information.<br />
We want to make sure that we can connect to postgres from localhost. While logged in to the machine with Postgres on it, do the following:<br />
<pre class="screen"><span class="command">pico /etc/postgresql/8.4/main/postgresql.conf </span></pre>
This will open the file where you will need to add access to localhost. Locate <i>#listen_addresses = 'localhost'</i> and remove the # symbol. This will tell postgres to allow connections to the databases as long as the connection is from that server.<br />
<br />
We still have more ways to go. PostgreSQL has a server role of 'postgres' that we will use later to connect to the database. However, there is no password (or the password is unknown). We need to connect to it as an admin and change the password (we will also connect to a default database on postgres - 'template1'). The next step will be to change the password.<br />
<pre class="screen"><span class="command"><b>>#sudo -u postgres psql template1</b></span></pre>
<pre class="screen"><span class="command"><b>>template1=#ALTER USER postgres with encrypted password 'your_password';</b></span></pre>
The confirmation to above will be 'ALTER ROLE' printed on it's own line. (Type \q to quit)<br />
Now we want to use MD5 authentication for postgres<br />
<pre class="screen"><span class="command">pico /etc/postgresql/8.4/main/pg_hba.conf </span></pre>
we scroll down to 'local all postgres ident' and change 'ident' to 'md5'<br />
Now to reset the connection:<br />
<pre class="screen"><span class="command"><b>sudo /etc/init.d/postgresql-8.4 restart</b></span></pre>
To test the connection simply type<br />
<pre class="screen"><span class="command">psql -U postgres</span></pre>
You will be prompted to enter the password, after which you will be in 'postgres'<br />
Most of this information is from https://help.ubuntu.com/8.04/serverguide/C/postgresql.html <br />
</li>
<li>Install Django (2 options)<br />
<pre class="screen"><span class="command">sudo apt-get install python-django</span></pre>
This will install Django 1.1.1 (depending on what version linux you are on). If you just want to play around it's fine. If you want to install a specific version of Django (as I needed to do), you have to do the following: <br />
- Go to Django website ( https://www.djangoproject.com/download/ )<br />
- Find the exact download path of the version you need to download<br />
- Use "wget exact.address.to/file.zip"<br />
- Use 'tar' command to extract the file.<br /> * tar xzvf Django-1.2.7.tar.gz<br /> * cd Django-1.2.7/<br /> * sudo pyton setup.py install<br />
- Go into the folder you extracted, and run "python setup.py install"</li>
<li>For some features in Django you might need more plugins such as psycopg2 (I believe* this step is optional for most)</li>
</ol>
Now you are ready to start actually setting up your project [I will be making another update for that] <br />
<br /></div>techphilohttp://www.blogger.com/profile/04687010390875983452noreply@blogger.com0tag:blogger.com,1999:blog-4966191728590054184.post-74966210191677535562011-12-20T04:44:00.000-08:002011-12-20T04:44:47.034-08:00Conception of how to do a Testing Suite with Selenium<div dir="ltr" style="text-align: left;" trbidi="on">Thoughts on organizing and starting an Automated Suite from ground up.<br />
<ol style="text-align: left;"><li>Develop test scripts using webdriver (although it is still in its early stages, this is where selenium is headed).</li>
<li>Develop in Python. Reason for this is that the language/platform used for the website is Python/Django. Once developers are in-house, they can be asked some questions if needed.</li>
<li>Split out everything possible to the smallest possible elements (such as 'selecting a dropdown' would be part of my company's selenium library, same as 'login', 'logout' scripts)</li>
<li>Create a Page class that stores all the paths to elements used in current script. When the path is changed, it will be very easy to change it once it's there.</li>
<li>Develop error catching to make it as explicit as possible so that there is no need to dig in as to what actually happened and where it happened (plan is to use screen shot capture capability for most non-obvious errors)</li>
<li>Additionally there will be a need for time measurements to get the approximate feel for how long will it take for pages to load. This will be stored with each sequential running of the test to see if it's going down/up/etc.</li>
</ol>The way I see the tests being is<br />
<b>--></b> General Script that calls a lot of minor scripts<br />
<span style="font-size: x-small;">Example: "Login", "Run Send Email Script", "Run Check sent email script", "Logout"</span><br />
<b>--></b> Specific Scripts will contain general actions (they will see the 'Page' class)<br />
<span style="font-size: x-small;"><span style="font-size: small;">These scripts will contain parameters such as user name, password, any other relevant parameters (so that they can be re-used if needed). </span></span><br />
<span style="font-size: x-small;"> Example: "Login" script will have 'driver.find_element_by_css_selector(email_input).click()'</span><br />
<b>--></b> Page class will contain the actual paths to the elements (css when possible, with comments if it's not)<br />
<span style="font-size: x-small;">Example: "email_input" will be email_input="input.id_email"</span><br />
<br />
<br />
</div>techphilohttp://www.blogger.com/profile/04687010390875983452noreply@blogger.com0tag:blogger.com,1999:blog-4966191728590054184.post-62238826645850750702011-11-11T23:37:00.000-08:002011-11-11T23:37:21.614-08:00Where to start with inception of a feature ||cue suspensful Inception music||<div dir="ltr" style="text-align: left;" trbidi="on"><br />
Let me ask you a question. For quality assurance what do you need before you have the specs to test? How about what do you need to visualize the potential pitfalls later. Mockups!<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoE11HTzQGrSfngWJG02AdVmQifkn8oQSvC-CU92gSKnh0MTmKZ7rMrD9PGCYrAI6qQbpM1483159SbtifD9QQc5OMOPpsPHF22DWlXz1ehlsG6kK3oklxNxiAqLyQ6mgkZTxTnVl9wSA/s1600/20070817wireframe.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="268" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoE11HTzQGrSfngWJG02AdVmQifkn8oQSvC-CU92gSKnh0MTmKZ7rMrD9PGCYrAI6qQbpM1483159SbtifD9QQc5OMOPpsPHF22DWlXz1ehlsG6kK3oklxNxiAqLyQ6mgkZTxTnVl9wSA/s320/20070817wireframe.gif" width="320" /></a></div><br />
Now from my view there are several degrees of pulling this off<br />
1. An actual list of requirements (necessary, but not sufficient)<br />
2. A very basic wireframe with a lot of text surrounding the wires telling you what the wires are for. This is a good start but not good at fleshing out scenarios. <br />
3. A mockup as close as possible to the way the form / screen would actually look.<br />
4. A working prototype simulating the behavior of the feature.<br />
<br />
We start with requirements, the 'duh' of a feature request. I don't want to go down the road of no list of requirements, it will lead to a dark and lonely place of talking to yourself at night.<br />
Then there's the basic wireframe. For straightforward functionality this might actually be sufficient. You give the programmer and the QA some sort of visualization of a product. At this point, if there is more complicated functionality which usually would not come out until actual implementation it's better to go farther then just wireframes.<br />
In comes Balsamiq Mockups. I really love this software. It gives you an opportunity to put what you are thinking about and make it look real. PERFECT tool for non-technical people. There is no need to know anything technical, it is drag and drop. It allows you to create as many details as you want, as well as if something is a note/question, you can "stick" a post-it note! I believe this is an important step in creating a design document that both QA and Programmer can look to. It clears confusion as to where the buttons should be, what is assumed and what is not (at least as far as the screen goes). With that said nothing is perfect, there will be revision and some more revision.<br />
The last level is a full fledged prototype. This part, done correctly, is beautiful. You get the mock feature that is functioning. Problem is that you will need a different set then for the above 3 options usually. This person would have to know HTML, and usually javascript to throw in some more complicated functionality.<br />
<br />
All these 3 levels depend on how complicated what you want is. If it is 'add a cancellation button' - just the requirement is enough. If it is 'create a login screen', a wireframe might be more fitting to show the approximate field/button position as well as logo and whatnot. If you are working with a form that has multiple fields, then you would want something that is more exact graphically. If it is complicated functionality/switching between screens/will need significant changes and testing, then look to creating a prototype.<br />
<br />
Hope this helps someone.<br />
Cheers!</div>techphilohttp://www.blogger.com/profile/04687010390875983452noreply@blogger.com0