Friday, March 21, 2014

Regression Testing: Manual or Automated?

The inquiry emerging at each one phase of advancement is that relapse after every emphasis takes excessively long, and the practicality being checked frequently had no progressions. Therefore, the likelihood of deformities is low. As a common consequence, we touch base at a thought to robotize all relapse situations and reject manual regression testing. The preferences here are self-evident: 

  • mechanized tests could be performed at whatever time
  • mechanized tests are extremely exact
  • mechanization could be utilized as a part of very nearly all testing methods 
  • programmed making of reports.

At the same time tragically, relapse tests robotization has numerous pitfalls that are seldom talked about. 

When you begin to mechanize relapse testing is important to understand a couple of inquiries: 

  • What practicality is to be secured by the tests
  • Auto tests architecture. 
  • Decision of an apparatus for regression test automation.

At the phase of changing from manual testing to automation tests, I got a task where I needed to test the enrollment of two sorts of records for the site on 43 spaces relying upon the nation. It was as hell-fire. The customer couldn't have cared less about the nature of the data showed. The necessities were as takes after: 

  • accounts are made without any lethal blunders; 
  • information data corresponds with the qualities ​​that are shown in the settings after creation.

After a few runs I understood that I've had enough. At that minute I could just see that the amount of enlistment fields is diverse for a few nations, and I likewise had some coding background in C#. An alternate relapse was close nearby and I couldn't waver. I asked my companion acquainted with mechanization to advise and demonstrate to compose tests. After numerous inquiries, tries and lapses a straightforward route test was conceived. I uncovered locators and Selenium web drivers – and lo and view, all the areas utilized the same locators. I had somewhat left to do – to run the last manual relapse in my life on all areas and fill the table with the fields and relating spaces. An alternate round of manual relapse – a long process with finishing the table – and appears as though is everywhere. 

This proceeded for a few discharges until the organization chose to robotize the majority of the usefulness formally. Since the customer was not knowledgeable in mechanization tests we chose to robotize any that is inside my learning on test computerization. 

Subsequently, we have secured very nearly the whole framework with autotests. All might be fine, however after any fixes a few tests began to fall flat. For the most part, it happened due to long scripts that hold a great deal of steps: 

Long situations hold much code and activities like that; subsequently, rehashing the first step may prompt disappointment of numerous tests. 

Due to the code redundancy, auto tests check the same point for ordinarily; this effects in unnecessary expanding of the test span. 

Give us a chance to think about an alternate extremely fascinating circumstance. The customer requested autotests not surprisingly and required to compose a couple from cases. He affirmed the thought, and in a few days we added test robotization to the arrangement. Anyhow our programmers finished not meet the due date, in the long run we needed to compose autotests dependent upon the current stage. With a deferral of a few days programmers had a discharge, yet more than a large portion of autotests fizzled. 

Just a brief time prior we had one more entertaining circumstance. We had gained a request for site mechanizing and have completed everything rapidly. A couple of weeks after the fact the client sent a letter grumbling that tests completed not work. As it turned out, he began a site upgrade and all the tests had fizzled. 

Accordingly, the preferences of manual testing are seen obviously – it doesn't rely on upon anything and might be carried out constantly. Surrendering manual testing will bring no good thing. Robotized and manual testing are interrelated and integral testing systems and every has stars and cos. When considering relapse situations robotization think about time consumptions for both composing tests and their backing. Additionally, give careful consideration that manual masters are normally paid less than the individuals who have abilities on test mechanization. 

Wednesday, March 12, 2014

What is TestNG?


So far we had been doing Selenium tests without creating a legitimate configuration for the test outcomes. Starting here on, we might handle how to make these reports utilizing a test schema called Testing.

Testing is a trying skeleton that conquers the restrictions of an alternate mainstream testing system called Junit. The "NG" signifies "Cutting edge". Most Selenium clients utilize this more than Junit in view of its favorable circumstances. There are such a variety of characteristics of Testing, yet we will just concentrate on the most paramount ones that we can use in Selenium.

Advantages of TestNG over JUnit


Preferences of Testing over Junit

There are three significant preferences of Testing over Junit:

Annotations are simpler to get it

Test cases might be gathered all the more effortlessly

Parallel testing is conceivable

Why do we require Testing in Selenium?

Testing can create reports dependent upon our Selenium test outcomes.

Webdriver has no local instrument for producing reports.

Testing can produce the report in an intelligible organization.

Testing streamlines the way the tests are coded


The arrangement of activities is directed by straightforward annotations that don't oblige techniques to be static.

Monday, March 10, 2014

Web driver importent questions


 1.  What is webdriver?
 WebDriver is a simpler, more concise programming interface in addition to addressing some limitations in  the Selenium-RC API. Selenium-WebDriver was developed to better support dynamic webpages where elements of a page may change without the page itself being reloaded. WebDriver’s goal is to supply a well-designed object-oriented API that provides improved support for modern advanced web-app testing problems.
2.      What are the advantages of selenium2.0/webdriver?
    •         Need no server to start
    •     Easy to code
    •         Has sophisticated API to support wide verity of browsers.
    •     Supports to test dynamic UI web apps.

    3.      Difference between the selenium1.0 and selenium 2.0?
    Selenium 1.0
    Selenium 2.0/Webdriver
    1.      It ‘injected’ javascript functions into the browser when the browser was loaded and then used its javascript to drive the AUT within the browser.

    2.      Selenium server need to start to run tests
    3.      Has some loop-holes in supporting complex UI apps,Javascript security
    4.      No support for headless broswers
    1.      WebDriver makes directcalls to the browser using each browser’s native support for automation

          2.      Not needed unless tests are run on local machine.
    3.      Supports even drag and drop features and no security loop-holes
    4.      Supports htmlunit driver –headless browser runs fast



    4.      What are the Locators are there in selenium 2.0?
    It supports locators based on Id,name,xpath,dom,css,class,tagname
    5.      How to handle the Ajax Applications in Web driver?
    There are 2 types of waits webdriver supports to handle ajax applications to make webdrive sync to execution:
    Implicit wait :
    driver.manage().timeouts().implicitlyWait(20,TimeUnit.SECONDS);
    Explicit wait:   WebDriverWait, FluentWait
    WebElement strr = (new WebDriverWait(driver,30)).until(ExpectedConditions.presenceOfElementLocated(By.xpath("//*[starts-with(@id,'yui_3_4_0_1_137509')]/ul/li[2]/a")));

     6.      Difference between findelement() and findelements()?
         findELement will find the first matching element.

         findELements will all the matching elements. You'll probably need to loop through all the elements  returned.
    7.      How to take the screen shots in seelnium2.0?
                File src2 = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
               
    8.  What is the limitations of web driver?
    • Can not automate desktop applications, supports only web applications
    •  No inbuilt commands to generate good reports
    • Cannot support readily for new browsers