Automated Testing Tools
At UniAPT, automated testing plays a critical role in maintaining the high quality and reliability of our tools and applications. We use a number of automated testing tools and technologies to optimise our testing processes, ensuring that our products are reliable and function as intended. This part of the documentation on Automated Testing Tools provides an overview of how these tools are integrated into our development workflow.
Overview of Automated Testing Tools
Step 1: Writing Test Cases
Jest for Unit Testing
// File: mathFunctions.test.js
const mathFunctions = require('./mathFunctions');
test('adds 1 + 2 to equal 3', () => {
expect(mathFunctions.add(1, 2)).toBe(3);
});
Selenium for Web Application Testing
# File: webAppTest.py
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome()
driver.get("http://www.uniapt.io")
assert "UniAPT" in driver.title
elem = driver.find_element_by_name("q")
elem.clear()
elem.send_keys("meta universe")
elem.send_keys(Keys.RETURN)
assert "No results found." not in driver.page_source
driver.close()
Step 2: Setting Up Continuous Integration (CI)
name: Node.js CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm test
Step 3: Automated Test Execution
Step 4: Continuous Feedback and Iteration
Benefits in Practice
Functionality: Primarily used for testing JavaScript and TypeScript codebases.
Workflow Integration:
Tests are written alongside the development of new features.
Automated test suites run on each commit via Continuous Integration (CI) pipelines.
How Automated Testing Tools W
Benefits in UniAPT’s Context
Last updated
Was this helpful?