Feeds:
Posts
Comments

are you automating test of a product?

are you sure that the automation is really important or not?

be sure that manual test cost > automated test cost.

How??

easy… just calculate first

manual test cost = manual preparation cost + (N x manual execution cost)

automated test cost = automated test preparation + (N x automated execution cost)

… where N is the number of time test run.

We should use test automation only when it advances the mission of testing.

Advertisements

I needed to download directory from ftp server modify it and uploaded back to server using powershell. At fist i found that [System.Net.WebRequestMethods+Ftp]::UploadFile and [System.Net.WebRequestMethods+Ftp]::DownloadFile works fine and in real life when my zip file size is bigger it does not work.

I have not found any solution to make it working so I used alternative way to solve it. I have written two batch fildes upload.bat and downlaod.bat and calling these batch files from my PS Script to execute.

Actually if anyone use bat file he/she need not to call the bat file from PS Scripts but in my case after downloading zip file from ftp server I modified many things in the files using powershell and then upload it back to server.

Here are the batch files you can try if needed upload.bat and download.bat

to rename a file we use Rename-Item command in powershell the command is very simple

Rename-Item $source $dest -force

But what about changing a folder/directory name? I made mistake to write the same command in case of folder/directory rename and it does not work, shows exception file not found which proves that the command is searching for a file not ready to rename and folder/directory.

After googling for some minutes I found the solution and the command is

Rename-Item -path $destFolder -newName $folderNewName

Example: Rename-Item -path ‘C:\AshrafTest\MyFolder’ -newName ‘MyFolder_New’

By the way the folder should contain some data to be rename. Pretty simple but wasted time to search internet so sharing 🙂

Recently I was trying to automate one step of my internet explorer actually my automation step was very simple I just needed to navigate an URL, read DOM of the URL, get text boxes and enter data in it. After entering data in text boxes I was suppose to click on login button.

Actually one of my 3rd party tool is depending on the login and was trying to automate the login and run the 3rd party tool so I need not to go to server everyday and do that.

It is easy to automate Internet Explorer by using a COM control named Microsoft Internet Controls (SHDocVw). To browse the DOM Microsoft.mshtml is used. I found a very helpful article with code in codeproject.com. here is the article : Automating Internet Explorer

By the way, I was facing problem to insert data in the text box  and click button. It worked fine in my local computer where VS is installed but for the computers where VS is not installed it shown exception to convert _Comobject to mshtml.HTMLInputElementClass . Download modified file.

My experiences says that we always suffer for asp.net application. because most of us use many tools for hosting and different provider gives different control panel. Overall it waste a lost of time to make the preparation of deployment in a shared hosting and at the time of hosting we face lots of problem too.

Today I watched a video in asp.net site which shown very clearly how we can easily deploy asp.net application in a shared hosting just using iis7 and visual studio. This is really a nice video. dot net developers who need to deploy products regularly in shared hosting should watch the video for faster deployment.

Watch the video here : Developing and Deploying In a Shared Hosting

Developing and Deploying In a Shared Hosting

Recently I have written a article which shows the power of WPF UI Automation. This library is really rich and make UI Automation easier.

Here is the article : Automate software using WPF UI Automation

I downloaded powerhsell from Microsoft website (http://support.microsoft.com/kb/968929) and installed it.

After successful installation I restarted computer and then open command prompt and write “Powershell” it shows me error “Add-PSSnapin : The Windows PowerShell snap-in ‘Pscx’ is not installed on this machine.”

To overcome that , download a 3rd party tool Powershell Community Extension from (http://pscx.codeplex.com/) and Install it. That will automatically override Profile.ps1 which was installed by powershell installation and will fix the problem.

Microsoft should add that in the installer.