Sunday, July 29, 2012

Software testing misunderstood

I recently read a nice blog post by James Bach where he discussed common misinterpretations of software testing specially in agile teams. While agreeing with most of his ideas' the following statement made a lot of sense to me

Avoid labeling an activity as a “test” unless it represents a sincere effort to discover a problem in a product 


In my software testing career, large number of people I have worked with, regardless of  their QA or development background, misinterpreted this basic concept. I do not have to explain how dangerous it is to claim that a feature of your product "works" just by running it. "Testing" is NOT merely running the product. A good test should uncover some sort of problem of your product/feature. Objective of testing should be to finding bugs. Just wearing QA hat and running the product does not do any good. It just claims that your product runs in one way but it will not be the only execution path. Interpreting "running product features" as "testing", destroys the quality of software in many ways.

- False claims contribute to draw a wrong picture about the status of product. The release plans, schedules everything is decided based on those untruthful information
- Large number of bugs uncovered in production use
You, during development cycles, update many stake holders of your project that the feature is running properly. You may also do multiple demonstrations of your feature to various parties. You must understand that the demonstrations of the feature or training sessions of the new feature just executes one or two of the hundreds of execution possibilities. Hence, it should not be interpreted as an indirect test execution and comes into conclusions that the feature works perfectly.
- Building a deadly trend among fellow developers/testers that quality is not important factor
When people start to believe that "running" the feature as "testing", then it like a virus spread across whole devs/testers of the organization. People just focus on happy path (positive testing) which eventually ruins the quality of the product.




Friday, July 27, 2012

SRC (System Resource Controller) in AIX










 One of the unique facilities available on AIX is System Resource Controller (SRC). The SRC gives a set of commands that make it very easy for the system administrator to maintain and manage the subsystems and subservers running on your AIX system.
What is a subsystem ?
Subsystem is a set of related programs designed to perform one particular function. The subsystems can be sub divided

Thursday, July 26, 2012

AIX Evolution – Over Twenty years of Progress



I have attached here the picture showing the AIX evolution over 20 years of progress.








Wednesday, July 25, 2012

Basic Linux Commands




 
mkdir - make directories


Usage : mkdir [OPTION] DIRECTORY 

Options

Create the DIRECTORY(ies), if they do not already exist.

Mandatory arguments to long options are mandatory for short options too.


-m, mode=MODE set permission mode (as in chmod), not rwxrwxrwx - umask

-p, parents no error if existing, make parent directories as needed

-v, verbose print a message for each

Thursday, July 19, 2012

Set backspace in Unix console



Sometimes the backspace key doesn't work for Unix. 

we can setup the backspace key to work in the console by typing the command and press backspace key.

stty erase



 it will be shown as stty erase ^H
If you have a problem using the backspace it should display you the above output.If not, it will just perform a backspace.
After doing that press CTRL+c . And now type anything

Sendmail Configuration in AIX


Daemon : sendmailTo start the daemon :# startsrc -s sendmail -a "-bd -q30m"wherebd - To start the sendmail as a SMTP mail relay routerq - Is the interval in which the sendmail daemon processes the saved messagesTo start the daemon automatically after the system boot:a. # vi /etc/rc.tcpipb. Uncomment the below linestart /usr/lib/sendmail "$src_running" "-bd -q${qpi}"To display the status of the

Using find command




The command find is used to search a given directory for a file or a given expression mentioned in the command. we can also do necessary actions on the output files using xargs

Some important options:

     -xdev                                          Stay on the same file system (dev in fstab).
    -exec cmd {} \;                           Execute the command and replace {} with the full

Thursday, July 12, 2012

System dump devices - AIX


Traditionally the default dump device for system dumps was: /dev/hd6 (paging space) and still is on a lot of systems. If there is not enough space to copy over the dump file after a crash, then the system administrator is prompted upon restart to copy the dump file over to some removable media , like a tape or DVD. This can be time consuming and it is sometimes the case that you want to get your

Wednesday, July 11, 2012

AIX ML/TL Upgradation steps


1. Pre-installation checksTo check packages/file set consistency# lppchk –v If we found some errors. We can get more information about problem & resolve it before continue with installation.# lppchk -v -m3Check the current installed ML/TL # instfix -i|grep ML # oslevel –sCheck Rootvg Commit all package/fileset installed on the servers# smit maintain_softwareCheck if rootvg is mirrored and all

To Do List - Before migration from AIX 5.3 to 6.1



Copy Sendmail.cf
Tar Perl Mondule if you use it in 5.3, this will be upgraded when going 6.1 and you might want to fall back to older version
Make sure you note the Number of Allowed Envrioment Process, this will fall back to default which 128 allowed process. **THIS IS CRITICAL**
Copy MOTD “Message of the Day”
Please Make Sure you turn of RSH since you use NIMSH/RSH to upgrade
Make sure

Two ways to create mksysb images in AIX


1) create on NIM server command: nim -o define -t mksysb -a server=master -a source= -a mk_image=yes -a location= This will create the mksysb image of the client server and define it on the NIM server. Example: nim -o define -t mksysb -a server=master -a source=edppbuslvd01 -a mk_image=yes -a location=/nim/mksysb/

Tuesday, July 10, 2012


Steps to remove PowerPath software, cleanup ODM and reinstall PowerPath varyoff Volume Group (varyoffvg )/etc/rc.agent stop (if you have clariion devices)Remove paths from Powerpath configuration  
powermt remove hba=all Delete all hdiskpower devices lsdev -Cc disk -Fname | grep power | xargs -n1 rmdev -dl Remove the PowerPath driver instance rmdev -dl powerpath0 Delete all hdisk

Unix filesystems explained


A filesystem is a logical collection of files on a partition or disk. A
partition is a container for information and can span an entire hard
drive if desired.
Everything in Unix is considered to be a file, including physical
devices such as DVD-ROMs, USB devices, floppy drives, and so forth.


Unix uses a hierarchical file system structure, much like an
upside-down tree, with root (/) at

Flavors of UNIX


 The table below summarizes some of the common UNIX variants and clones. While the table lists about forty different variants, the UNIX world isn't nearly as diverse as it used to be. Some of them are defunct and are listed for historical purposes. Others are on their way out. In some cases, vendors have defected to Microsoft technology. In others, mergers and acquisitions have led to the

Wednesday, July 4, 2012

RAM disk in AIX


AIX provides 'mkramdisk' command for producing a disk that resides in the RAM for very high I/O intensive applications like database.Here is a simple set of commands to create a ramdisk and a filesystem on top of it:1.create a RAM disk specifying the size # mkramdisk 5GThe system will assign the available RAM disk. Since this is the first one, it will be called as ramdisk02.Check for the

Tuesday, July 3, 2012

How to clear AIX NFS cache on a server


Do the following on a server that is having problem exporting NFS mounts
------------------------------------------------------------------------------------

1) Move the currents exports file to another name
       mv /etc/exports /etc/exports.old

2) Create a new exports file
       touch /etc/exports

3)  Unexport everything
       exportfs -ua

4)  Stop NFS
       stopsrc -g nfs

5)  Stop

Procedure to mount and unmount NFS filesystems on AIX


1)  Show what is being exported on the source server     showmount -e    Note:  If the command above does not show the correct mount points    that needs to be exported.  You can run the following command to attempt    to export the filesystems.     exportfs -a2)  To unmount the filesystem on the source server that is being NFS on other systems.     a)  unmount the NFS mount points on the target

Replace failed mirrored internal disk in AIX



The following procedure should be used to replace a failed internal (boot) disk on AIX 5 or higher, with software mirroring.(Note: in these examples, hdisk0 and hdisk1 are doubly-mirrored internal disks and members of rootvg; hdisk1 has failed)1. Identify the failed disk by analyzing the errpt logs. Confirm the failure using lspv by checking if "PV State" is "Missing".2. Break the mirror and

Monday, July 2, 2012

Consuming a SOAP service using WSO2 API Manager

SO2 API Manager is the new kid in the block, the first fully open source API management platform which can be used to create, manage, consume and monitor APIs. WSO2 API manager is based on the award winning SOA middleware platform, WSO2 Carbon thus it inherits the features provided by the modular Carbon platform.
API authors and publishers can publish both REST and SOAP services to external consumers or partners through WSO2 API manager. In this post, we will look in to the steps of publishing and consuming a SOAP based web service using WSO2 API Manager.

pre-requisites:
Download and install alpha version of WSO2 API Manager from http://dist.wso2.org/products/api-manager/1.0.0-alpha/wso2am-1.0.0-ALPHA.zip. Similar to the other WSO2 Carbon products, you just need to have JDK-1.6.0 or later to run WSO2 API Manager. Then you can just extract the binary and start the server.

Step 1:

We will use a simple SOAP based web service hosted in WSO2 StratosLive Application Server. You can find the WSDL of the service at http://appserver.stratoslive.wso2.com/services/t/superqa.com/Axis2Service?wsdl

Step 2:

WSO2 API Manager consists of three different applications which serve for distinct user requirements. The API Gateway which is accessible through https://localhost:9443/carbon, is used as a gateway for API calls. The API Provider web app is used to publish, manage and monitor statistics of APIs. API provider can be accessed through https://localhost:9443/apiprovider. API Store application acts as the API consumer front end where users can subscribe for the published API. API Store is accessible through https://localhost:9443/apistore Ideally, three different user categories access these three applications. The API gateway is usually hosted and managed by API management provider. Therefore, we can assume that the default admin user of WSO2 API Manager as the API management provider thus he/she initiates creating rest of the user roles in the system. The API provider webapp is usually accessed by people who want to publish and manage new APIs. Therefore, we can think of another distinct role related to creating and publishing APIs. Finally, the API consumer user access API store webapp to subscribe for APIs.

Though we can use the default admin user to access all of the above applications, to be much realistic, lets start to create the roles and users associated to the API provider and API store applications.

  • Log in to API gateway app as admin user (user name=admin, password=admin).
  • Click on Configurein left menu and select Users and Roles
  • Click on Add New Role, enter "publisher" (or whatever you want) as the role name and click on next
  • Select the following permissions from the permission tree

Admin Permissions --> Configure --> Governance
Admin Permissions --> Login
Admin Permissions --> Manage --> API --> publish
Admin Permissions --> Manage --> API --> create
Admin Permissions --> Manage --> Resources --> Govern

























  • Click on Finish to complete the creation of new role
  • Now access the Users page and click on Add New User. (say 'charitha' as the user name of new user, password is 'charitha')
  • Assign the above role (publisher) to the new user
We have just created a new user who is granted permissions to access API provider webapp.

Step 3:


Access https://localhost:9443/apiprovider. The log in page of the API publisher application will be launched. Log in to the application using the credentials of the user which we have created in the previous step.
Click on Add menu item in the left navigation pane to add a new API.













Enter the following values for the mandatory fields in the above form.

Name: Axis2ServiceAPI
Context: /SOAPService
Version: 1.0.0
Endpoint URL: http://appserver.stratoslive.wso2.com/services/t/superqa.com/Axis2Service
Tier Availability: Bronze

Leaving the other default values as they are, click on Create to add the new API. The published API will be shown in the All APIs page and it will be in the CREATED state.


Step 4:



The APIs which are at the CREATED state cannot be consumed by any user. Therefore, we need to publish the API to API store. Click on the Axis2ServiceAPI-V1.0.0 in All APIs page which will direct you to the detailed information page of the selected API. Click on Lifecycles tab. Select the state as PUBLISHED. Select Push To Gateway option so that the API will be registered in the API gateway.













Clicking on Update will publish the API. If you see the log of API gateway, you will notice the following message. INFO - API Initializing API: charitha--Axis2ServiceAPI 


Step 5: 


Now, the API which we have created from the SOAP based web service is in PUBLISHED state so that a consumer can subscribe to the API and invoke it. API store can be used for the consumers to subscribe to APIs. Access https://localhost:9443/apistore/. The landing page of WSO2 API Store application will be shown. You will notice the API which just has been published in available in that page.
Click on Signup at the top right corner to register a new consumer user. Enter 'apiconsumer' as the username and 'apiconsumer123' as the password.
Log in to API store using the new consumer's credentials.


Step 6:


Now, we are inside the API Store web application. We should create an application to make API subscriptions and consumption. Click on My Applications tab.
Add a new application with the name, AxisApp as shown below.













We need to generate an OAuth key to consume any API. Click on the Axis2ServiceAPI - 1.0.0 in the API list or left pane of the API Store web application.  Select Axis2App from the Applications dropdown list at the right of the page and click on subscribe.









The "Subscription Successful" confirmation dialog will be popped up. Click on Go to My Subscriptions button to check our new API subscription.











Click on Generate in the above page to create a new API key. Once the key is generated, click on Show Key and copy the API key.

Step 5: Now, we have everything required to consume the API. API has been published to the store, subscribed to the API and possessed an API key. Lets invoke the API using any client. In this example, I will use soapUI, the world's best and most user-friendly web service invocation utility to invoke the API.

  • Create a new soapUI project or use an existing project. 
  • Add the following SOAP request to your soapUI project.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://service.carbon.wso2.org">
   <soapenv:Header/>
   <soapenv:Body>
      <ser:echoString>
            <ser:s>charitha</ser:s>
      </ser:echoString>
   </soapenv:Body>
</soapenv:Envelope>

  • Add http://localhost:8280/SOAPService/1.0.0/ as a new endpoint url in soapUI request editor. (This url can be found under the overview tab of Axis2ServiceAPI - 1.0.0 in API store)
  • Add the following HTTP header 
Authorization: Bearer  <Your API key which has been generated when subscribing to the API >
  • Now, your soapUI request editor will be similar to the following.










  • Submit the request and check the response. Since we have subscribed under bronze tier, you will be allowed to send 1 request per minute

Linux boot process


In this topic we will discuss indepth of Linux Boot Sequence.How a linux system boots?
This will help unix administrators in troubleshooting some bootup problem.
Before discussing about it I will notedown the major component we need to know which are responsible for the booting process.


        1.BIOS(Basic Input/Output System)

        2.MBR(Master Boot Record)

        3.LILO or GRUB

AIX Boot Process


Three phases available in BOOT Process1. Ros kernel init phase2. Base Device Configuration3. System boot phase1. Ros Kernel init phase (PHASE1)A. Post (power on self test)In this post it will do basic hardware checkingB. Then it will go to NVRAM and check the boot list for last boot device (hdisk0 or hdisk1).C. Then it will check the BLV (hd5) in boot device.D. Then it

Modifying /etc/inittab entries without using vi