Metadata-Version: 2.4
Name: sel2pw-scan
Version: 0.2.0
Summary: Offline inventory of Selenium Java test projects for a Playwright migration assessment
Author: Shan Konduru
License-Expression: MIT
Project-URL: Repository, https://github.com/ShanKonduru/sel2pw-scan
Project-URL: Issues, https://github.com/ShanKonduru/sel2pw-scan/issues
Project-URL: Changelog, https://github.com/ShanKonduru/sel2pw-scan/blob/main/CHANGELOG.md
Keywords: selenium,playwright,migration,assessment,inventory,test-automation,java
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Software Development :: Testing
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == "dev"
Dynamic: license-file

# sel2pw-scan

Offline inventory of a Selenium Java test project, for assessing a migration to Python Playwright.

`sel2pw-scan` reads your `.java` files and build files and writes a report: which test framework you use,
how many tests, page objects and helper classes you have, and how often your code uses Selenium features
that need deliberate work in a migration (fixed sleeps, frames, alerts, JavaScript calls, data providers and
so on).

It is a scanner only. It does not convert or change any code, uses no AI model and makes no network calls.

## Install

Requires Python 3.10 or newer.

```bash
pip install sel2pw-scan
```

## Use

```bash
sel2pw-scan path/to/selenium-project --out inventory.md
```

| Option | Effect |
|---|---|
| `--out FILE` | Write the report to a file instead of printing it |
| `--format md` | Default. Summary report, described below |
| `--format json` | Full detail for tooling, including locator values and annotation attributes |
| `--version` | Print the version |

`python -m sel2pw_scan ...` works the same way.

## What the report contains

The Markdown report (`--format md`) lists:

- the scanned folder path, detected frameworks (TestNG, JUnit 4, JUnit 5, Cucumber), Selenium version
  (resolved from Maven properties, `gradle.properties` or Gradle variables) and build files
- counts of Java files, test classes, page objects, base and utility classes, and test methods, split into UI
  tests (code that reaches Selenium or Appium) and unit tests (code that does not), plus disabled ones
- for Cucumber projects: each feature file and scenario with its tags, how many test cases each Scenario
  Outline expands to, and the number of step definitions
- how often each of 27 Selenium constructs appears, such as `fixed_sleep`, `frames`, `alerts`,
  `javascript_execution`, `data_provider` and `selenium_grid`
- every test method as `ClassName#method`, with its file, line, assertion count and constructs
- every class with its role (test, step definitions, runner, page object, base/utility, enum, interface or
  other), parent class and the project classes it depends on

It does **not** contain test code, Gherkin step text, locator values, string literals or test data. It does
contain names: classes, test methods, features and scenarios. Read it before sharing, and rename anything you
consider sensitive.

The JSON report (`--format json`) adds locator values and annotation attributes, so treat it as internal.

## Limits

The scan uses pattern matching, not a full Java parser, so counts can be slightly off for unusual code.
It finds JUnit and TestNG tests by annotations such as `@Test`, and Cucumber scenarios in `.feature` files
written with English Gherkin keywords. Kotlin and Groovy sources are not read.

## License

[MIT](LICENSE)
