Frequently Asked Questions (FAQ)

Q: What is the principle behind CukeTest's object recognition? How does script compatibility and maintainability fare when the application UI updates or runs on different computers?

A: CukeTest builds a multi-dimensional automation recognition system primarily based on object recognition with visual recognition as a supplement. The core object recognition technology reads internal properties of controls to precisely locate them, ensuring script stability and efficiency. When standard control properties are unavailable (e.g., virtualized environments, games, or fully custom-drawn interfaces), image recognition, OCR, or virtual controls can be used as supplements to achieve full coverage.

This design offers several advantages:

  1. Recognition principle and accuracy: CukeTest supports various technologies, including Windows, Qt, Java, Linux (ATK), and Web. It works by directly reading control properties such as name, className, text, etc., which provides higher accuracy and performance compared to pure visual‑only solutions.

  2. Handling UI updates: When the tested application's UI changes, you do not need to rewrite the entire script. CukeTest stores control definitions in an object model (.tmodel). You only need to locate the changed control in the Model Manager and update its recognition attributes. For dynamic attributes, you can ignore them or use wildcards/regular expressions in the matching patterns (/model_mgr/model_attribute.md#pattern) to improve tolerance.

  3. Cross‑environment deployment: Because the core mechanism relies on object properties rather than fixed coordinates, scripts are portable across different resolutions or machines. As long as the technology stack and core control attributes remain consistent, the script can usually be reused without modification.

Q: Do I need to manually open the application under test before each script run?

A: No. CukeTest can automatically launch and close the application via script. During recording, you can specify the launch path in the Recording Settings, and CukeTest will generate the corresponding launch code.

Q: How can I wait for the application to fully start before proceeding with subsequent actions?

A: Using a fixed delay (e.g., Util.delay()) is unreliable across environments. A better approach is to wait for a key window of the application to appear. You can combine the control's exist(seconds) method for intelligent waiting.

Example (JavaScript):

JavaScript
Python
// Launch the application process
await Util.launchProcess('calculator');

// Wait up to 10 seconds for the window titled "Calculator" to appear
if (!await model.getWindow('Calculator').exist(10)) {
    throw new Error('Application "calculator" failed to start; consider extending the wait time.');
}

// ...continue with other automation steps after the window appears...
# Launch the application process
proc = Util.launchProcess('calculator')

# Wait up to 10 seconds for the window titled "Calculator" to appear
if not model.getWindow('Calculator').exists(10):
    raise Exception('Application "calculator" failed to start; consider extending the wait time.')

# ...continue with other automation steps after the window appears...

Q: Can a single test case interact with multiple different applications?

A: Yes. Within one test scenario you can interact with multiple applications. During recording, click the Launch Application button on the toolbar to start a second application and continue recording. CukeTest records actions for each application into the same script.

Q: I have limited coding skills; can I still use recorded scripts for testing?

A: Absolutely. While CukeTest encourages the BDD (Behavior‑Driven Development) style for readability and maintainability, teams with less coding experience can directly use recorded scripts.

Two simple approaches:

  1. Simplified BDD project: Create a single feature file with one Scenario and one Step. Paste the full recorded script code into the step implementation. This lets you run tests immediately and provides a path for future refactoring.
  2. pytest mode: Rename the recorded script file and function to follow the test_ naming convention, then run it with pytest.

Q: How can I run automated tests without opening the CukeTest UI?

A: Use the command line. Navigate to your CukeTest project folder and execute cuke run. This enables integration into CI pipelines and other automation workflows.

Q: How do I prevent the CukeTest window from covering the application under test during execution?

A: You can minimize the CukeTest window at the start of the script and restore it at the end:

JavaScript
Python
const { CukeTest } = require("cuketest");

// Minimize at script start
CukeTest.minimize();

// ...perform automation steps...

// Restore after script finishes
CukeTest.restore();
from leanproAuto import CukeTest

# Minimize at script start
CukeTest.minimize()

# ...perform automation steps...

# Restore after script finishes
CukeTest.restore()
Alternatively, activate the tested application's main window using its activate() method to keep it on top.

Q: How can I run multiple test projects in batch?

A: CukeTest offers two main ways:

  1. Command line / batch scripts: Write a .bat or shell script that sequentially runs cuke run for each project.
  2. Batch Run Tool: Use the built‑in Batch Run Tool (/integration/batch/index.md) to configure a list of projects, set execution order, and generate a combined report.

Q: Why can't I manually operate the mouse while a script is running?

A: Automated scripts simulate mouse actions precisely. Manual mouse movements interfere with the scripted actions, causing failures in locating controls or executing the intended steps.

Q: Can I integrate CukeTest scripts into our own framework outside of the CukeTest environment?

A: Yes. CukeTest provides a standard Python package (.whl) that can be installed in any Python environment. You can import and invoke CukeTest's automation capabilities from your custom scripts or frameworks.

Details: Manually Install the Python Automation Library

Q: How does CukeTest differ from Selenium, Appium, etc., and what category of testing tool is it?

A: CukeTest is an all‑in‑one automation testing platform. Unlike Selenium (Web) or Appium (Mobile) which focus on specific domains, CukeTest provides a unified solution covering desktop, web, and mobile automation, with built‑in BDD/TDD frameworks, recording, debugging, execution, and reporting.

Key features:

  • Integrated Cucumber and pytest‑bdd support.
  • End‑to‑end workflow from recording to reporting.
  • Cross‑platform automation for various application types.
  • Extensibility to combine with Selenium, Appium, and other open‑source libraries.

Q: How to report bugs or suggest features?

A: You can reach us through: