Ally's a QA

2009-Mar-7 - OOP languages and concepts

OOP concepts:

  • encapsulation - Conceals the functional details of a class*.
  • modularity - Simple parts connected by clean interface.
  • polymorphism** - Different data types respond to methods of same name
  • inheritance - Subclass, specialized version of class.

*Class - abstract characteristics of a thing (object)

  Object - pattern of a class

  Instance - actual object created at runtime

  Multiple inheritance - one subclass has more than one superclass

 

**Polymorphism:

    • Override - Child-class overwrites parent-class function (NOT private)
    • Overload - Functions with same name, but different parameters (type / number / order) (NOT private in parent)

If a function would have different behavior in subclasses, it should be virtual.

If a superclass (base class) has a virtual function, it should be overridden.

OOP languages: C++, Java, Python, Perl ...

  C++/Java Python Perl
integers primitive native types objects (of int class) treated as double float
self pointer this self (any)
constructor classname() __init__ NEW
destructor ~classname() __del__ DESTROY
class members public, private, protected all public all public
methods** public, private, protected all virtual all virtual
private variable private xxx; __privatevar all public*
pass by value/reference C passes by value; Java passes references to objects by value. Passes references to objects by value.*** Pass by reference - hard / symbolic

 

* Perl coding convention: use _ or __ (double underscore) before variable to indicate private. But not enforced.

** Subroutine:

  • function: "return xx;"
  • procedure: no return. Sometimes synonymous with function, eg. in C.
  • method: OOP concept, part of objects

*** Python 2 kinds of data structure:

Immutable: string, tuple

Mutable: list, dictionary

 

Comments (0) :: Permanent Link

2009-Mar-7 - Mail / FTP / HTTP protocols basis

SMTP:

Commands:

one session:

HELO

MAIL FROM: <...>

RCPT TO: <...>

(RCPT TO: <...>)

DATA

...

.

QUIT

Other commands: RSET, NOOP

Response: 1xx, 2xx, 3xx, 4xx, 5xx

 

POP3:

Commands: USER, PASS, STAT, LIST, RETR, DELE, NOOP, RSET, QUIT, TOP msg n

Response: +OK, -ERR

 

IMAP vs. POP3:

IMAP:

  • Client does not download the whole mail, only downloads the mail header.
  • Client can directly manipulate the mails on server.
  • User can maintain the mail directory on server.
  • User can retrieve specific part of a mail, eg. text.  

 

FTP:

Commands: USER, PASS, RETR, TYPE (A/E/I/L), PASV, STOR, DELE, LIST, PWD, NOOP, QUIT, CWD

Response: 1xx, 2xx, 3xx, 4xx, 5xx

 

HTTP:

Simple:  GET URI HTTP/version

Full:

(General-Header                  - Date / Pragma

 Request-Header                  - From / If-Modified-Since / Referer / User-Agent

 Entity-Header)                     - Content-Encoding / Content-Length / Content-type /

                                               Expires / Last-Modified

 CRLF

[Entity-Body]                       *OCTET

Response:

1xx     informational

2xx     successful

3xx     redirection

4xx     client error

5xx     server error

   

Servers

Clients

HTTP  Windows IIS; Apache IE; FireFox; Netscape; Mozilla
Linux Apache FireFox; Netscape; Mozilla
FTP Windows IIS; ServU WSFTP; CuteFTP; FFFTP; FlashFTP; SmartFTP
Linux proftpd (command line)
Mail Windows IIS; MS Exchange; KerioMailServer MS Outlook; Outlook Express; Foxmail; Eudora
Linux Postfix (command line)
Proxy Windows CCProxy /
Linux squid /

 

Comments (0) :: Permanent Link

2009-Mar-7 - Test Plan framework

Generic Test Plan:

1. Reference Documents (Requirements)

*2. Objective (Prioritize functionality / usability / reliability /security / stability / sustainability / portability / efficiency ...)

*3. Scope / Test types (and pass criteria)[1]

4. Test environment (software / hardware / network / other facilities)

5. Test tools

6. Human resources (team member vs. responsibilities)

*7. Schedule

8. Bug priority / severity definition

*9. Alpha / Beta / release criteria

10. Risk analysis (mitigation plan)

 

* I consider must-have.

[1] Test types:

  • Functional test - normal, boundary, force error
  • System test - compatibility, conformance (standard), integration, volume / load (performance / stress), I18N / L10N, security, stability test
  • Coverage test

 

Performance Test Plan:

1. Objectvie /Goals (requirement, pass / fail criteria)

2. Navigations (business process, prioritize)

3. Scenarios (min / max / ave. load)

4. Environment

5. Monitors (measurements)

6. Schedule

7. Resources

8. Risks

Comments (0) :: Permanent Link

2008-Aug-19 - 14 Steps to Faster-Loading Web Sites

From "High Performance Web Sites", Steve Souders.

 

1. Make fewer HTTP requests
2. Use a CDN
3. Add an Expires header
4. Gzip components
5. Put CSS at the top
6. Move JS to the bottom
7. Avoid CSS expressions
8. Make JS & CSS external
9. Reduce DNS lookups
10. Minify JS
11. Avoid redirects
12. Remove duplicate scripts
13. Turn off ETags
14. Make Ajax cachable and small

 

Comments (0) :: Permanent Link

2008-Aug-12 - How to ... (Windows applications)

1. How to migrate your codes to support Unicode:

1) Add: #include 〈tchar.h〉

2) char -> TCHAR

3) "text string" -> TEXT("text string")

4) Use CharNext & CharPrev instead of ++ & --

 

2. In MS Excel, how to freeze the row/column header, or split the views of a sheet:

1) Window -> Split

2) Window -> Freeze Panes

 

3. In MS Excel, how to add a filter button next to the row header:

1) Highlight the whole header row.

2) Data -> Filter -> AutoFilter

 

4. In Exchange server, how to forward mail to another mail server:

1) Open Exchange System Manager.

2) Administrator Groups -> First Administrator Group -> Routing Groups -> First Routing Group -> Connectors -> New -> Routing Group Connector

 

5. How to encrypt a folder in Windows system:

The folder Properties -> General -> Advanced -> Encrypt contents to ...

 

6. How to use FTP proxy while browsing in IE:

1) Internet Options -> Advanced: Disable folder view for FTP.

2) Set FTP proxy in Internet Options -> Connection.

 

7. In Outlook, how to insert a mark before every comment you make:

Tools -> Options -> E-mail Options -> Mark my comments with

 

8. In Outlook, how to add voting buttons to your mail:

New a message. Open Options. Find Use voting buttons.

 

9. How to create a new LAN with VM:

1) VM settings -> Hardware -> Ethernet: select Host-only or NAT for Network Connection.

2) Set VM Default Gateway to the host VM NAC IP.

 

10. How to install perl module in Windows:

>  If the downloaded file is .tar.gz. For example, you can get these types of files from http://search.cpan.org/

   1) Extract the archive.

   2) Read the Readme file for how to install the module. Usually it includes the following steps:

    perl MakeFile.pl

    nmake

    nmake test

    nmake install

Note: Download and install nmake first.

 

>  If the downloaded file is .ppd / .tgz. For example, you can get these types of files from http://ppm.activestate.com/PPMPackages/zips 

   1) Open command window, and run:

    ppm install C:\pathtomodule.ppd

 

11. In C/S environment, how does client renew server ip - hostname info:

Run command: nbtstat -R

Example, server has changed IP. After running this command, client can successfully ping server hostname again. 

 

12. How to enable/disable UAC in VISTA:

1. Launch Local Security Policy. (Tips: type "sec" in Run editbox, it will automatically list the program names.)

2. Open Security Settings -> Local Policies -> Security Options -> UAC.

 

13. How to reboot system by command:

shutdown -r -t 0

 

14. How to install Active Directory on Windows Server:

Run command: dcpromo

 

15. How to configure SQL 2005 to accept SQL Authentication:

1) Right-click on the server node and select 'Properties'.
2) Select 'Security' from the left menu under 'Select a page'.  
3) Under 'Server Authentication', select the 'SQL Server and Windows Authentication mode option'.
4) Click 'OK' to close the dialog.
5) Right click on the server node and choose 'Restart' for the changes to take affect.
Enable SQL Server login

1) In the server node expand 'Security' and 'Logins'.
2) Right click on the login name and select 'Properties'.
3) Enter a password and confirm the password for the login. 
4) Select 'Status' from the left menu under 'Select a page'.  
5) Set the 'Login' option to 'Enabled'.
6) Click 'OK' to close the dialog.

Cited from http://kbase.gfi.com/showarticle.asp?id=KBID002804

 

16. How to hide partition:

1) Run Regedit.

2) Under [HKEY_CURRENT_USER]-->[Software]-->[Microsoft]-->[Windows]-->[CurrentVersion]-->[Policies]-->[Explorer], add a DWORD value [NoDrives], and set the decimal value as follows: set [1] to hide partition A, set [2] (A double) to hide partition B, set [4] (B double) to hide partition C, etc. Set [67108863] to hide all.

3) Under [HKEY_LOCAL_MACHINE]-->[Software]-->[Microsoft]-->[Windows]-->[CurrentVersion]-->[Policies]-->[Explorer], add a DWORD value [NoDrives], and set the decimal value as follows: set [1] to hide partition A, set [2] (A double) to hide partition B, set [4] (B double) to hide partition C, etc. Set [67108863] to hide all.

 

17. How to change multiple OS boot up priority in Windows:

C:\boot.ini

  

Comments (0) :: Permanent Link

<- Last Page :: Next Page ->

About Me

Here I share my experiences and thoughts as a QA engineer, and a place to put my notes.

Search This Blog

Categories

My thinkings
My knowledge base
My tools

Links

Home
View my profile
Archives
Friends
Email Me

Friends

whollymindless
strazzerj
syed1982
mferris
ukkuru
michaeljf
agvasqa
priyabala
srini847
spikyone
naba123
Blog Widget by LinkWithin