Wednesday, October 28, 2015

How to Free Android Phone System Memory to remove insufficient storage message

From few months I was getting insufficient storage whenever try to update or install new App.I get this working after following below mentioned simple steps:

Step 1: Goto your phone keypad .

Step 2: Type *#9900# into your phone dialler.

Step 3: Option list will pop up, select "delete dumpstate/logcat".

Step 4: Restart your Phone.

Monday, February 2, 2015

List of Automation Testing Tools


Below is the list of Powerful Automation Testing Tools
  • Squish
  • QTP (UFT)
  • Selenium
  • Watir
  • Appium(Mobile)
  • Ranorex
  • SOAP UI (Web Service Testing)




Note: Will Keep on adding as my research keep on progressing.

Tuesday, January 13, 2015

Groovy Code to send email automatically via outlook using attachment



//Please ensure to download javax.activation.jar and mail. jar and under your classpath.

@GrabConfig(systemClassLoader=true, initContextClassLoader=true)
@Grab( 'javax.mail:mail:1.4.7' )

import javax.mail.internet.*;
import javax.mail.*
import javax.activation.*
import javax.mail.internet.MimeBodyPart;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeMultipart;
import javax.mail.internet.InternetAddress;
import javax.activation.FileDataSource;
import javax.activation.DataHandler;




message = "test groovy mail"
subject = "groovy sent this"
toAddress = "mentioned to address here"
fromAddress = "mentioned from address here"


host = "your host name"        // for eg : inrelaymail.ABC.com"



port = "25"  
body = "Attachment Testing"

filename = "C:\\Sample.txt"

Properties mprops = new Properties();
mprops.setProperty("mail.transport.protocol","smtp");
mprops.setProperty("mail.host",host);
mprops.setProperty("mail.smtp.port",port);

Session lSession = Session.getDefaultInstance(mprops,null);
MimeMessage msg = new MimeMessage(lSession);


//tokenize out the recipients in case they came in as a list
StringTokenizer tok = new StringTokenizer(toAddress,";");
ArrayList emailTos = new ArrayList();
while(tok.hasMoreElements()){
emailTos.add(new InternetAddress(tok.nextElement().toString()));
}
InternetAddress[] to = new InternetAddress[emailTos.size()];
to = (InternetAddress[]) emailTos.toArray(to);
msg.setRecipients(MimeMessage.RecipientType.TO,to);
InternetAddress fromAddr = new InternetAddress(fromAddress);
msg.setFrom(fromAddr);
msg.setFrom(new InternetAddress(fromAddress));
msg.setSubject(subject);
msg.setText(message)


MimeBodyPart messagePart = new MimeBodyPart();

messagePart.setText(body);


MimeBodyPart attachmentPart = new MimeBodyPart();

FileDataSource fileDataSource = new FileDataSource(filename) {

    @Override

    public String getContentType() {

  return "application/octet-stream";

    }

};

attachmentPart.setDataHandler(new DataHandler(fileDataSource));

attachmentPart.setFileName(fileDataSource.getName());


Multipart multipart = new MimeMultipart();



multipart.addBodyPart(messagePart);

multipart.addBodyPart(attachmentPart);

msg.setContent(multipart);

Transport transporter = lSession.getTransport("smtp");
transporter.connect();
transporter.send(msg);

Sunday, July 20, 2014

Utility to Automatically get the MAC Address(Physical Address) using Excel Interface

Below Code will Automatically get the MAC Address in Excel U I Form

intCount = 0
strMAC = ""
' We're interested in MAC addresses of physical adapters only

strQuery = "SELECT * FROM Win32_NetworkAdapter WHERE NetConnectionID > ''"

Set objWMIService = GetObject("winmgmts://./root/CIMV2")
Set colItems = objWMIService.ExecQuery(strQuery, "WQL", 48)

For Each objItem In colItems
    If InStr(strMAC, objItem.MACAddress) = 0 Then
        strMAC = strMAC & "," & objItem.MACAddress
        intCount = intCount + 1
    End If
Next
' Remove leading comm
If intCount > 0 Then strMAC = Mid(strMAC, 2)
strMAC = Split(strMAC, ",")

TextBox1.Text = Trim(Replace(strMAC(0), ":", "")) ' Excel Text Boxes

TextBox1.Enabled = False   ' Excel Text Boxes


Friday, March 14, 2014

QC Automatically download Test Case Utility with User Interface

In this post I am posting an Utility that will automatically download Test Case from QC.The difference in this utility is that I have created an UI in excel which will ask the person about it's credentials like User Name, Password , Project Name and Domain Name.So instead changing in the code that many people found difficult I have implemented the same using Excel User Interface Methodology.

Steps to Execute:

Step1: Download Utility

Step2: Enable Macros

Step3: Click on Download Test Case Button and a form will be enable.

Step4: Enter your data on the form and click ok.

Step5: Please mentioned the correct path under Path Folder, it will be your QC Test Case Path from test plan.

The Excel is fully integrated with exception handling so any field left blank will pop you an error message.


Let me know if any further more information is required.

Monday, March 10, 2014

Error || Active X Component can't Create Object || QC and VBA Connectivity

While connecting with QC using VBA or VB Script using QC OTA library encountered an error message which says "Active X Component Can't Create Object".

After couple of hours debugging found issues in my OTA library and the simple resolution is to install TD Connectivity add in again.

Below are the steps listed that will guide you to how to install addin.

Step1: Open your QC URL which might be ( http://<server address>//qcbin.

Step2: Navigate to Addin Page.

Step3: It is free and easily downloadable as well.

Step4: After installation the code disappear and scripts start working.

Let me know if any more help is required on this.

Apart from this I did try re-registered my dll into registry editor but didn't help.

Sunday, August 11, 2013

How to Make VBA code run faster

Most of the times VBA Developer encounter this issue that there VBA code is taking lot of time to execute, hence i am posting some of the tips that will help VBA code to run faster.

1)Always make Screen Updating Value to false before running the program, it will save lot of time.
    To prove this lets write a simple program without turn off screen updating values and with turn off screen update values.

Condition1 :When Screen Updating is not mentioned by default its true.

Public Function TestVBACode()
       Program_Start_Time = Timer
               For i = 1 To 10
                    Range("A" & i).value = "Hello VBA"
               Next i
        MsgBox Program_Start_Time - Start & "Seconds"
 End Function
                                                      
                                                                                                  
     
Condition2:When Screen Updating is mentioned as false.

Public Function TestVBACode()
       Application.ScreenUpdating   = False
             Program_Start_Time = Timer
                     For i = 1 To 10
                           Range("A" & i).value = "Hello VBA"
                    Next i
         Application.Screen Updating = True

       MsgBox Program_Start_Time - Start & "Seconds"

End Function