Thursday, February 09, 2012

Clearing all event logs


Here is the code to clean up all event logs in the current machine/server.

The code is in power shell, as some people feel this is the best language to write scripts on Windows.

strComputer = "." 
Set oWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate,(Security)}!\\" & _
strComputer & "\root\cimv2" )
Set cLogFiles = oWMIService.ExecQuery _
("SELECT * FROM Win32_NTEventLogFile" )
For Each oLogfile in cLogFiles
Wscript.echo("Clearing Logfile " + oLogFile.Name)
oLogFile.ClearEventLog()
Next

Wednesday, February 01, 2012

Web driver script

Hasan from Trainline shared with us Selenium WebDriver script.

I was using Selenium before Web Driver came into the picture. Need to try this out.

 

using System;

using NUnit.Framework;

using OpenQA.Selenium;

using OpenQA.Selenium.IE;

using OpenQA.Selenium.Remote;

using OpenQA.Selenium.Support.UI;

namespace WebDriver

{

    [TestFixture]

class TrainlineTest

    {

        [Test]

public void webDriverTest()

        {

var ieCapabilities = DesiredCapabilities.InternetExplorer();

            ieCapabilities.SetCapability(InternetExplorerDriver.IntroduceInstabilityByIgnoringProtectedModeSettings, true);

var driver = new InternetExplorerDriver(ieCapabilities);

            driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(10));

           driver.Navigate().GoToUrl("http://buytickets.thetrainline.tw.testttl.com");

            driver.FindElement(By.Id("OriginStation")).SendKeys("London");

            driver.FindElement(By.Id("DestinationStation")).SendKeys("Manchester");

            driver.FindElement(By.Id("SingleJourneyCheckBox")).Click();

new SelectElement(driver.FindElement(By.Id("AdultsTravelling"))).SelectByText("2");

IWebElement query = driver.FindElement(By.Id("outwardDate"));

            query.SendKeys(Keys.Control + "a");

            query.SendKeys("23/02/2012");

            driver.FindElement(By.Name("extendedSearch")).Click();

Assert.IsTrue(driver.FindElement(By.Id("showTicketsIdButton")).Displayed, "Show Prices Button Not Present");

        }

   }

}

Tuesday, January 10, 2012

The best file search utility–fast and free

I have come across Agent Ransack and it was really fast. Works well if you want to search for text inside a particular file.

Initial screen

Agent Ransack - great software for searching for text in files

Searching for the text “sync tool is run”.

sync tool is run

Visual Studio 2008 Load Test Gotchas!

 

I really like this link: http://www.codeproject.com/KB/testing/VS2008LoadTestGotchas.aspx

This was shared by our NFT SME.

Tuesday, December 13, 2011

Wi-fi connection for Ipad?

After getting my Ipad2 (Thanks to Thoughtworks!), I wanted a Wi-Fi connection since the Ipad2 had Wi-Fi but no 3G. Wi-Fi routers cost anything from Rs.1500 to Rs.10,000.

Question was: How do I convert my laptop to a Wi-Fi router?

Connectify is the answer.

Link: http://www.connectify.me/

The basic (lite) version is free and can easily used for providing Wi-Fi connection to the Ipad2.

Sunday, December 04, 2011

Looking at IPhone 4s, IPod Touch and Galaxy 2–Part 1

 

Reviews I liked were

http://reviews.cnet.com/8301-19512_7-20115364-233/iphone-4s-first-take/ – More or less, the official version copied from Apple.

http://www.youtube.com/watch?v=cP-SSg_zZ1M – Watch for the question (joke) at the end.

IPhone has good

  1. Processing power
  2. Camera and HD video
  3. Siri (Voice recognition)

Can I use Ipod Touch instead of an IPhone. If you are thinking of calling somebody, IPod can be used for that as well. ( http://lifehacker.com/378511/turn-your-ipod-touch-into-an-iphone)

Are there other differences between Ipod Touch and I Phone? Well, both have identical features except… IPod touch does not have

  1. Email
  2. Maps
  3. In built Camera
  4. Microphone
  5. Blue tooth

External link : http://reviews.cnet.com/8301-19512_7-10115117-233.html

http://www.themobileindian.com/news/1307_iPhone-or-Samsung-Galaxy-S2 - Comparison between Iphone 4 with Samsung Galaxy 2.

Thursday, November 24, 2011

NFT Improvements

Found out we are losing time due to aborted runs. People are looking at different ways to avoid the run getting aborted. I feel it is mostly due to environment failures. Having a good environment should provent 70% of the failures. On another note, I would like to have an email sent to all of us in NFT whenever a run is triggered or when it is completed/aborted.

I have two solutions for that which depends on following info (ie whenever a run is triggered or completed/aborted, VSTS writes into the loadtest database).

1. A trigger on the database . Basically fired on “insert or update”. And this sends an email to  us.

2. Wrote a script in Auto It which queries the database and finds out if a new run was introduced or not. This would require the script to know about the latest run id (which will be fed as input parameter)

Had a discussion with our architect and he felt the first option was better. I felt the same too.

Collecting IIS Paths from the server.- Part 2

The last time I had mentioned about the pipeline which made sure the IIS paths are correct. Now we will go to the next step and look at the stages for this particular pipeline.

The pipeline has 4 stages.


  1. TOC_Copy_JasCasStubFile
  2. TOC_Compare_JasCasStubSize
  3. TOC_Copy_Physical_Path_of_Stubs
  4. TOC_Compare_Physical_Path_of_Stubs
We will look at each stage in detail in part 3 of this blog series.

Monday, November 21, 2011

What can I improve in performance testing

I was just wondering if we could combine all our soak tests into one. One ground rule we can follow during performance testing is “how it is done in production”?. In this particular project, all the streams are deployed and used simultaneously in production.

Well, I have raised the question to our client. Once I propose the solution (how to implement it), hoping the client would accept it. This would bring in huge savings in testing time.

To the reader: Did you also have a good idea and ask the client to accept it? If so, what is the approach u followed?