Skip to content

About

Perform basic crud operation to get taste of testComplete software , i have follow up with little industry standard regarding the folder structure , abstraction layers for functionlity , avoid unstable locators.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

NotePad Automation using TestComplete — Project Deep Dive

Repository

Project: NotePad-Automation-using-TestComplete
Author: Ujjwal Bisht
GitHub: https://github.com/teche74/NotePad-Automation-using-TestComplete


Overview

This project demonstrates how to automate a Windows desktop application using SmartBear TestComplete with a structured automation framework approach.

Instead of creating only recorded tests, the project focuses on:

  • Better project organization
  • Separation of concerns
  • Stable object identification
  • Reusable automation functions
  • Abstraction layers
  • Basic BDD-style thinking
  • CRUD operation automation on Notepad

The repository is a strong beginner-to-intermediate example for engineers learning desktop automation using TestComplete.


Why This Project Is Interesting

Most beginners using TestComplete rely heavily on:

  • Record & Playback
  • Hardcoded object paths
  • Repeated steps
  • Unstable locators

This project tries to avoid those issues by introducing:

✅ Modular structure
✅ Name Mapping usage
✅ Reusable scripts
✅ Organized folders
✅ Scenario-based execution
✅ Separation between test logic and UI interaction

That makes the framework closer to how automation is implemented in real enterprise desktop testing projects.


Tech Stack

Area Technology
Automation Tool TestComplete
Language JavaScript
Test Style Keyword + Script Hybrid
Application Under Test Windows Notepad
Mapping Strategy Name Mapping
Testing Type Desktop UI Automation

Repository Structure Analysis

The repository contains the following main folders:

KeywordTests/
NameMapping/
Scenarios/
Script/
Stores/
TestedApps/

and suite/project files:

E2ENotepadAutomation.mds
E2ENotepadAutomation.mds.tcLS
README.md

Folder-by-Folder Breakdown

1. KeywordTests/

This folder contains keyword-driven test flows created inside TestComplete.

Purpose

  • Visual test flow management
  • Easier execution for beginners
  • Reusable action sequences
  • Faster debugging

Why It Matters

Keyword tests are useful when:

  • Non-programmers contribute to testing
  • QA teams want visual readability
  • Hybrid frameworks are used

The project combines keyword testing with scripting, which is a practical enterprise approach.


2. NameMapping/

This is one of the most important parts of the framework.

Purpose

Stores UI object mappings for:

  • Notepad window
  • Text editor
  • Menu items
  • Dialogs
  • Buttons

Why Name Mapping Is Important

Desktop applications often generate:

  • Dynamic properties
  • Changing window handles
  • Runtime IDs

Using Name Mapping allows tests to avoid fragile locators.

Instead of directly accessing objects like:

Sys.Process("notepad").Window(...)

the framework can use aliases:

Aliases.notepad.window.editor

This improves:

✅ Readability
✅ Maintainability
✅ Stability


3. Scenarios/

This folder likely contains scenario-based test organization.

Examples:

  • Open File
  • Save File
  • Update Text
  • Replace Text
  • CRUD operations

Why This Is Good Design

Instead of writing one huge automation script, the framework separates test scenarios logically.

This mirrors real-world framework design.


4. Script/

This is the core automation logic layer.

Usually this folder contains:

  • Utility functions
  • Base classes
  • Page logic
  • Common reusable actions

Expected Architecture

The framework appears to follow a layered approach:

Test Scenario
    ↓
Reusable Functions
    ↓
Mapped UI Objects
    ↓
Application Interaction

This is a strong automation design pattern.


5. Stores/

Stores in TestComplete are used for:

  • Baseline images
  • Test data
  • Regions
  • Properties
  • File checkpoints

Why Useful

They help support:

  • Validation
  • Comparison
  • Data-driven testing

6. TestedApps/

This folder/configuration contains the applications configured for execution.

Example:

notepad.exe

Benefits

Instead of manually launching apps every time:

  • TestComplete controls startup
  • Execution becomes repeatable
  • Environment becomes consistent

Important Automation Concepts Demonstrated

1. Stable Locator Strategy

One of the biggest desktop automation challenges is unstable locators.

The project attempts to reduce flakiness using:

  • Aliases
  • Name Mapping
  • Controlled object hierarchy

This is extremely important for desktop testing.


2. Abstraction Layer

Good frameworks avoid direct UI calls inside tests.

Bad Example:

Aliases.notepad.menu.click()
Aliases.notepad.editor.Keys("Hello")

Better Example:

NotepadPage.enterText("Hello")

This project attempts to follow that layered design.


3. Reusability

Reusable methods reduce:

  • Duplicate code
  • Maintenance cost
  • Debugging complexity

Reusable functions are critical in enterprise automation.


4. Framework Thinking Instead of Script Thinking

A major learning point from this repository is:

Automation is not just writing scripts. It is designing maintainable systems.

That mindset separates beginners from automation engineers.


Possible Test Scenarios Covered

Based on the repository description and folder structure, the framework likely automates:

Scenario Description
Create File Create a new text file
Read File Open and validate content
Update File Modify existing text
Delete/Clear Remove text or reset editor
Save File Save using dialogs
Replace Text Replace occurrences
Menu Interaction File/Edit operations

Key TestComplete Features Used

Name Mapping

One centralized object repository.

Advantages

  • Easier maintenance
  • Better readability
  • Stable references

Aliases

Aliases simplify long object paths.

Example:

Aliases.notepad.Editor

instead of:

Sys.Process("notepad").Window("Notepad")

Keyword + Script Hybrid

A practical enterprise pattern.

Why Hybrid Is Powerful

Keyword Tests:

  • Easy to understand
  • Fast to build

Scripts:

  • Flexible
  • Reusable
  • Scalable

Using both together is often better than using only one approach.


Desktop Automation Challenges This Project Helps Understand

Dynamic UI Elements

Desktop apps may generate:

  • Dynamic IDs
  • Runtime properties
  • Window handle changes

Synchronization

Automation must handle:

  • Delays
  • Dialog openings
  • App loading

Object Identification

One of the hardest parts of desktop automation.

This project helps beginners understand:

  • Object trees
  • Mapping strategy
  • Alias usage

How This Project Reflects Industry Practices

Even though the application is simple (Notepad), the structure reflects real-world automation practices.

Industry Concepts Visible

✅ Layered framework
✅ Object repository
✅ Reusable utilities
✅ Scenario separation
✅ Stable locators
✅ Modular organization

These concepts scale to:

  • ERP systems
  • Legacy desktop apps
  • Banking software
  • Healthcare systems
  • RMS applications
  • POS systems

Suggested Improvements

The framework is already structured well for learning, but here are possible future enhancements.

1. Add Page Object Model Style

Example:

Pages/
    NotepadPage.js

Benefits:

  • Cleaner abstraction
  • Easier maintenance

2. Add Assertions Layer

Example:

BaseAssertions.verifyText(expected)

Benefits:

  • Centralized validation
  • Better reporting

3. Add Data-Driven Testing

Use:

  • CSV
  • Excel
  • JSON

Benefits:

  • Higher coverage
  • Reusable tests

4. Add BDD Feature Files

Example:

Feature: Update Text

Scenario: Replace existing word
    Given user opens notepad
    When user replaces "Hello" with "Yellow"
    Then editor should contain "Yellow"

This improves readability.


5. CI/CD Integration

Possible integrations:

  • Jenkins
  • Azure DevOps
  • GitHub Actions

Benefits:

  • Automated execution
  • Faster feedback

What Beginners Can Learn From This Repository

This repository is valuable because it teaches more than simple recording.

Learning Outcomes

Automation Framework Design

How folders and modules are organized.

Name Mapping

How stable desktop locators are managed.

Reusable Functions

How to avoid duplication.

Desktop Testing Concepts

How Windows applications behave during automation.

Abstraction Layers

How to separate UI from test logic.

Maintainability

How to build tests that survive UI changes.


Best Takeaway From This Project

The strongest idea in this repository is:

Even small automation projects should follow scalable architecture principles.

That mindset is extremely important for QA automation growth.


Final Verdict

This project is a strong learning resource for engineers who want to understand:

  • Desktop automation
  • TestComplete framework design
  • Name Mapping
  • Reusable architecture
  • Stable locator strategy

Even though the application is simple, the framework thinking is aligned with industry practices.

It is especially useful for:

  • Beginners learning TestComplete
  • QA engineers moving from manual to automation
  • Engineers working on Windows desktop applications
  • Teams maintaining legacy enterprise software

Useful References

Official TestComplete Documentation

https://support.smartbear.com/testcomplete/docs/

Repository

https://github.com/teche74/NotePad-Automation-using-TestComplete


Closing Thoughts

Many automation engineers focus only on “making tests run”.

This project demonstrates something more valuable:

✅ Structure
✅ Maintainability
✅ Scalability
✅ Stability

That is what real automation engineering is about.

About

Perform basic crud operation to get taste of testComplete software , i have follow up with little industry standard regarding the folder structure , abstraction layers for functionlity , avoid unstable locators.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages