Forum Discussion

PaulDonny's avatar
PaulDonny
Regular Contributor
12 years ago

Testing API and Web Based Solution Simultaneously

Some background:

My API testing utilizes property files that gives the parameters for the API (can be used in both SoapUI and a custom built harness). Another part of my team tests a web-based application that, essentially, does the exact same thing. I wanted to create a post to go over my thought process with testing both together.


Cross-Compatible testing between Web-Based application and API:
This is a project I dreamed up about a week ago. Currently, we are testing a product that is web based and one that is API based. The web based application does not use the API as it's back end and thus both projects require independent testing. The issue I saw is that both projects do essentially the same thing. So why not have a single utility that tests both either simultaneously or allows the user to test something they have tested in one application in the other. Thus far there has been several challenges to this, but I have done research on quite a few methods and have made a couple work.

The first method attempted was a custom browser, essentially. It's a Java library that utilizes your default browser. This worked well to some degree but was sensitive, difficult to maintain and would require extensive knowledge of the code in order to maintain. These are all deal breakers for me.

SoapUI HTTP requests was my second idea. It's ... ok. But it also means another application that has to be installed for everyone and just overall, a hassle IMO. I wanted a nice neat bundle, something lightweight that can be easily updated and distributed. While I have extensive experience in SoapUI, especially in embedding it into Java, not one else in my company has this sort of experience. Again, maintenance and updating is extremely important to me as I usually have about 10 - 20 different R&D projects going on at any point in time along with my regular tester duties.

Then it hit me, Selenium IDE. It's extremely light weight, browser add on. It is easy to distribute and offers a lot of the features I desire. While slightly more difficult to use for the end user, I can easily do what I do with SoapUI and have a Java application develop the test scenarios and then allow Selenium to just run it with the parameters input. Maintenance work can be easily performed utilizing Selenium's user interface and by inserting a customized tagging solution within the project when creating the master project (Only 1 person would have to do this each release and then distribute it throughout the team). The Java project would recognize the tags and replace the value with the correlating values from the property file.


The benefits to this:


  • Ability to simultaneously test both applications using similar/identical data to ensure similar/identical results.

  • Cross training team members to be able to test both applications

  • Easily distribute scenarios used when reproducing defects

  • Ability to store files for Regression and Build Verification Testing (This is huge since I could easily set it up to run 100s of files for regression testing and essentially automate the entire regression process utilizing the skill set of the manual testers to ensure that the automation process is aligned with their needs, since they are doing it!)

  • Ease of maintenance, a single person can maintain this method with a minimal amount of effort




Hope you enjoyed the read. If you have any questions or suggestions regarding my methodology for this please post!

2 Replies

  • Hi,

    I have the same requirements. Can you share how you implemented it ?

    Thanks,
    Preeti
  • PaulDonny's avatar
    PaulDonny
    Regular Contributor
    Hi,

    Ultimately I was unable to implement this as I switched companies. After doing the research for it my course of action was to utilize selenium and creating a custom API harness with a database driven testing system. The tests for Selenium could be created utilizing a UI.