Code/Script testing methods

In the era of Network automation and DevOps, it became important not only to code, but also to test our code and make sure it can successfully operate and gives guaranteed results, certainly, we can achieve that by using defined testing methods. Eventually, those testing methods can typically be divided to functional and non-functional methods.

What is the difference between functional and non-functional?

Functional testing methods involves checking an application does what it is supposed to do, it is usually performed manually or by automated tools like Selenium & UFT. Shortly, this is a “black box”, since, the tester usually doesn’t know exactly what the code is doing.
Non-functional testing methods incorporates all test types focused on the operational aspects of a piece of software, such as testing the Performance, Security, Usability, and Compatibility.

What are those tests?

  1. Unit testing:
    – usually performed by a developer.
    – testing “units”- the smallest testable piece of code– function & method.
    – concurrent with the development.
    – testing framework: JUnit (Java), NUnit (C#), mini-test (Ruby), Pytest (Python).
    – TDD – test-driven development– write tests before writing any code.
    – “white box” / “glass box” – the person doing the testing knows what the code is doing.
  2. Integration testing
    – checking to make sure the code works together.
  3. User acceptance testing
    – involves users saying if what they got is what they want.
  4. Performance testing
    – checking an application works under load.
    – JMeter, LoadRunner, Locust (Python scripts).
  5. Regression testing
    – testing to make sure that new features don’t break old features.
    – overall, try to automate as much as possible.

Generally, that was just a brief on how to assure the functionality and the results of the code before launching it to users.

Don’t miss our Articles & Podcasts!

We don’t spam! Read our privacy policy for more info.

Osama Aboelfath is co-founder at Recursive-lookup. Osama is a network engineer and developer with over 10 years of production network engineering, deployment & operation.

Leave a Reply