maanantai 19. syyskuuta 2016

Android development. Virtualdevice commands and Cordova.

I just gathered here commands I need for development:
List all your emulators:
emulator -list-avds
Run one of the listed emulators:
emulator @nameofyouremulator
where emulator is under:
${ANDROID_SDK}/tools/emulator

To deploy on specific device use:

  • Target specification. This includes --emulator--device, or --target=<targetID>.

keskiviikko 14. syyskuuta 2016

PostgreSQL on Mac OSX

Installing postgreSQL was so hard for mac. Because there are zero complete tutorials?? Or they require I know postgreSQL commands beforehand. This tutorial is for total noob.

Steps:
  1. $ brew update
  2. $ brew doctor
  3. $ brew install postgresql
Start or Stop postgresql

$ brew services start postgresql

$ brew services stop postgresql

THEN for MAC creating default db failed, so use command

$ createdb

after that you can login to psql using

$ psql

You can also setup database to specific folder using:

$ psql -d template1

To exit the psql command line use:

CTRL + D

tiistai 26. huhtikuuta 2016

Installing MongoDB on OSX EL Capitan

So I recently started using OSX and I have been struggling with all the commands around. I tried to install MongoDB about 10 hours before finally getting how to do it. So here is short how I did it.

1. Install homebrew http://brew.sh/
2. brew install mongodb
3. brew install autoconf
4. brew install php56 //This is optional I think
5. brew install openssl
6. brew link openssl --force
7. Install PEAR and PECL http://jason.pureconcepts.net/2012/10/install-pear-pecl-mac-os-x/
7. sudo pecl install mongo
8. locate your php ini which is loaded. php --ini (Loaded Configuration File:         /usr/local/etc/php/5.6/php.ini)
9. add line extension=mongo.so somewhere in the file
10. Edit file /etc/apache2/httpd.conf and add line LoadModule php5_module /usr/local/opt/php56/libexec/apache2/libphp5.so (this points to the installed php version)
11. sudo apachectl restart
12. create php.info file and check that you see mongodb installed.

torstai 7. toukokuuta 2015

Setting up DNS on Namecheap: host records

Here is a picture how to setup host records properly on Namecheap.

Host Name: @ & www should be A record type and point to your server IP address. TTL can be keept at default value. This means anyone can now connect to my domain nikiahlskog.com with www. or without. Subdomain is added like "ida" and then ip of my server and record type A. www.ida subdomain is set with CNAME. On the server side, virtualhost file forwards the requests for the user.

perjantai 3. huhtikuuta 2015

TestLink

I wanted to have Quality Center like QA program that runs under LAMP stack. Finally I found the solution which is called TestLink: http://testlink.org/

TestLink is open source test management system. It only requires LAMP + htaccess allow override. It is also easy to install.

<VirtualHost *:8080>

        ServerAdmin NAME
        ServerName testlink.servername.domain
        ServerAlias
        DocumentRoot /home/username/public_html/testlink/

        <Directory /home/username/public_html/testlink/>
                Options Indexes FollowSymLinks
                AllowOverride All
                #Require all granted
                Order allow,deny
                Allow from all
        </Directory>

</VirtualHost>

keskiviikko 29. lokakuuta 2014

Selenium Web Browser Automation

"Selenium automates browsers. That's it! What you do with that power is entirely up to you. Primarily, it is for automating web applications for testing purposes, but is certainly not limited to just that. Boring web-based administration tasks can (and should!) also be automated as well."


1. Go to http://www.seleniumhq.org/download/ and Download latest released version .XPI file.
2. Run it
3. To open selenium in Firefox click this icon

 
4. Navigate to the site you want to automate.
5. To start recording click the red recording button.


6. Complete required test steps in browser and finally stop recording by pressing the same button again.
7. Save your selenium case.


sunnuntai 5. lokakuuta 2014

We needed a test case form in a school case because we don't have any testing program. I designed this test case form quickly. This can be used in software testing.

Testcase
UsecaseUC01UserSoda buyer
PreconditionUser has found vending machinePost-conditionCoca-cola achieved
Automatedyes/noTest case statusReady
Test designernameDate15.9.2014
Test namenameTest ID
PriorityHigh / middle / lowTester namename
ApplicationFor example java classTest case statusnot completed
Description
General description what will be tested. In this example test case user buys coca-cola from vending machine.
Job phaseDescriptionExpected outcomeTest report
1Walk to soda machineSoda machine foundOK/Fail/not completed
2Insert money to vending machineMoney inserted and vending machine accepted moneyOK
3Select product and press buttonCoca-cola falls to slotFail
jneGrab coca-colaCoca-cola achievecNot completed
DefectDescriptionComments
Job phase3
Coca-cola didn't drop to slot
I smashed the whole wending machine
Noticed byname
SeverityHigh/Middle/low
Datedate
Tester namename
StatusNew/Fixed
PriorityHigh/Middle/Low