Testing and Performance Optimization
Website Testing
Types of website testing
Here are different types of website tests that web developers and testers perform, each with
specific objectives and strategies:
Type Description
Acceptance tests These tests check whether the whole website, client
and server, works as intended. Individual website
users or teams of users typically perform this type of
test at the end of a project just before the launch.
Integration tests These tests ensure that the website’s components and
functions work together as they’re supposed to. For
example, a developer might run a series of tests to
ensure that the client can make application
programming interface (API) calls to the server and
that the server sends the proper response back.
Unit tests These tests validate that a specific feature or behavior
of the website performs as expected. A unit the
smallest testable part of a website. For example,
developers might run tests on a drop-down menu on
their web form to make sure it opens and closes
properly and contains the right data.
Functional tests These tests check the behavior of the website by
simulating real-world scenarios based on the initial
requirements for the site. Closed-box testing is a
common way to verify behaviors. The idea behind
these tests is to see how the website behaves as if real
users were using the site in actual business and
personal scenarios.
Performance tests These tests show how the website performs under
different levels of stress. Load testing, for example,
evaluates performance under real-life load conditions.
An example of a load condition is the number of
requests a website can fulfill at a given time. The more
requests the site is given, the higher the load.
Regression tests These are tests that check whether new features break
or degrade functionality. Regression testing is
important when developers modify, change, or add
features. When a new or updated feature breaks the
website, it is referred to as a regression bug.
Stress tests These tests are similar to performance tests, except
they use extreme load conditions to see how much a
website is able to handle before it fails.
1
Testing and Performance Optimization
Usability tests These tests verify how easily a user can complete a
task using the tested website. Usability tests will
typically have a number of tasks that the testers will
seek to complete. Testers will evaluate how well the
site enables the testers to complete the tasks.
Areas to test
Web developers must consider several areas when testing a website. The types of tests you
just learned about apply to each of these areas, which include:
• User interface (UI): Web developers need to ensure that the user interface (UI) they’re
developing behaves according to the site’s design and requirements. Web developers
make sure that a site has an overall design, including:
o Where elements appear on a page
o How elements interact with each another
o The colors and fonts on the site
o How colors and fonts change when users interact with elements
• Responsive design: Responsive design relates to UI but addresses a particular and
important aspect of the user experience. Web developers must test their websites to
ensure the user experience performs equally well on all devices.
o A design is responsive if the user experience adapts to different screen sizes with
no loss in usability.
o A site is usable if every user on every device can access and interact with the
content.
• Code: Web developers should test all the code they are using on their website. Web
developers write a lot of their own code, and they also integrate open source code.
Open source code might have bugs as well. A thorough and methodical testing strategy
can find issues and bugs. It’s important to thoroughly test a website code to ensure
that it is free of bugs, secure, and performs well.
• Application programming interface (API): When the client-side code of a website
calls an application programming interface (API) on the server side, many technical
pieces have to work together to make the interaction successful. Web developers test
this interaction between the client and the server. When using an API, the client sends
data to the server. The server then does the work and sends data back to the client.
Web developers test to ensure that the data transfer happens securely and accurately.
• Databases: Many websites rely heavily on data, so the design and performance of the
underlying database are important for a good user experience. While web developers
might not design, build, and structure the database (a database administrator usually
undertakes these tasks), it is the web developer’s responsibility to ensure that the
database works well with the website.