Web API Testing

download Web API Testing

of 2

Transcript of Web API Testing

  • 8/11/2019 Web API Testing

    1/2

    If your development plans include an APIaccessible over the Internet via web services,QualityLogic can provide services to assistyou in thoroughly testing the functionalityand performance of your API. QualityLogichas a long history of testing APIs for someof the largest players in the tech industry.

    Although web services are traditionallythought of as XML over SOAP, a far broaderrange of technologies are used by ourcustomer base to implement their Web APIs,including protocols and data formats suchas REST, Atom, GData, RSS, XML-RPC,KML, JSON, KML-GeoRSS, OpenSearch,RDF, YAML, and many others. Regardlessof the implementation technologies used foryour API, QualityLogic can help with yourtesting.

    QualityLogics API testing methodologyincludes the following steps:

    uAPI Specification Review A detailedreview of the API specification and anyrelated use case documentation. Thisreview of the API specification from a testperspective typically uncovers numerouserrors in the implementation before asingle test case is written.

    uTest Specification Development Awritten test specification is developed

    detailing the test conditions and expectedresults for each test case.

    uTest Framework Development Although we use standard opensource tools like SoapUI and JMeterfor our testing, many times a set ofstatic resources need to be developedas a perquisite to automated test casedevelopment.

    Web Services API Testing

    www.qualitylogic.com

    uTest Case Development This is theactual coding of the test scenarios. Defectsare reported to you as they are uncoveredduring the test case development.

    uTest Execution and Reporting AsAPI test cases are typically automated,regression testing is typically quick,

    with most of the effort being placed inproblem isolation and reporting.

    QualityLogic offers two distinct typesof testing for your Web Services API:Functional Testing and Performance Testing.

    Functional Testing

    Functional testing takes an externalperspective of the API, using the APIspecification and published Use Cases todetermine the valid inputs and expected

    outputs. This is classic black box testing,without an intimate knowledge of theAPIs internal structure. A typical APItest developed by QualityLogic covers thefollowing areas:

    uBaseline Tests These tests exercise eachAPI method in isolation.

    Boundary conditions

    Repeating elements

    Combinations of parameter values

    Default value assumptions (i.e., optionalparameters)

    Data types and sizes

    Correct return tags and values

    uTask-Oriented Tests Multiple API callsare made replicating common tasks andreal-world scenarios documented in theUse Cases. Characteristics of these testsare as follows:

    Features

    uAPI specification

    review

    uTest specification,

    test framework

    and test case

    development

    uTest execution

    and reporting

    Benefits

    uEnsure your

    web services

    API meets your

    customers

    expectations

    for function and

    performance

    uOnshore testing

    at a very

    competitive price

  • 8/11/2019 Web API Testing

    2/2

    Dependencies between API calls

    Calling order

    Repetitive transactions

    State transitions

    Propagation of data to external systems

    u Forced Error Tests - These tests containtypical error scenarios, such as missingrequired elements, empty content, andcontent exceeding maximum limits,across a representative sampling of theAPI methods. Test assertions include:

    Correct error messages

    Fallback behavior

    Transaction rollback behavior

    Performance

    Performance testing a web services APIencompasses a wide range of activities,including creating a test environment,setting realistic performance targets,developing test scenarios, generating highquality test input data, test execution, androot cause analysis. QualityLogic can helpwith some or all of these activities depending

    on your needs.Key performance metrics for web servicesAPI performance testing include responsetimes, throughput in terms of API calls anddata volume, transaction errors, server andnetwork utilization, and a variety of otherkey indicators. These metrics are gatheredas the result of the following types ofperformance testing activities conducted byQualityLogic:

    uLoad Testing The web services API

    is loaded up to the target number oftransactions per second to determineif the response times and other keyperformance metrics meet targets.Typically this testing is done in a numberof stages, including establishing a baselinefor each transaction, load testing eachtransaction independently, and finallyload testing entire groups of transactions.

    u Stress Testing The load on the webservices API is ramped up until some partof the supporting infrastructure fails. The

    purpose of this testing is to determinehow much margin there is between theexpected traffic volumes and the point atwhich the infrastructure starts to fail.

    u Endurance (Soak) Testing The webservices API is subjected to typical loadsover extended periods of time, withoccasional traffic spikes typical of actualusage model. The intent is to identifyproblems that occur only after extendeduptime, such as memory leaks.

    u Scalability Testing A series of loadtests are run with varying infrastructureconfigurations to determine how best toscale in order to deal with traffic loads.This can be a key part of determiningthe appropriate production hardwarenecessary to deal with both current andfuture traffic volumes.

    QualityLogic has the experience, skills,and resources to help you quickly roll out areliable and scalable Web Services API. To

    learn more, go to www.qualitylogic.com,call us at 1 800 436-6292 (US toll-free)or +1 805 531-9030, or send an emailto [email protected].

    Phone 805 531 9030 Fax 805 531 9045

    [email protected] www.qualitylogic.com

    2009-2013 QualityLogic Inc. All rights reserved. QualityLogic and the QualityLogic logo areregistered trademarks of QualityLogic Inc. All other trademarks are the property of their respec-tive owners.010613

    Web Services API Testing