Skip to content

feat/CUS-10884-Added class to perform actions on text file - #347

Merged
akhil-testsigma merged 1 commit into
devfrom
feat/CUS-10884-Added-class-to-perform-actions-on-text-file
Feb 25, 2026
Merged

akhil-testsigma merged 1 commit into
devfrom
feat/CUS-10884-Added-class-to-perform-actions-on-text-file

Conversation

@akhil-testsigma

@akhil-testsigma akhil-testsigma commented Feb 25, 2026 •

Copy link
Copy Markdown
Contributor

Publish this addon as PUBLIC

Addon Name: Text Utils
Jarvis Link: https://jarvis.testsigma.com/ui/tenants/3072/addons
Jira : https://testsigma.atlassian.net/browse/CUS-10884
Added class to perform actions on text file

Summary by CodeRabbit

  • New Features
    • Added file text replacement actions supporting local files and URL-based inputs
    • Includes regex-based text replacement capability
    • Supports replacing text between markers, at specific occurrences, or all occurrences
    • Updated file paths can be stored in runtime variables for downstream use

@akhil-testsigma
akhil-testsigma merged commit 0284907 into dev Feb 25, 2026
1 check passed
@coderabbitai

coderabbitai Bot commented Feb 25, 2026 •

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 060f4f5 and 83c928a.

📒 Files selected for processing (6)
  • text_utils/pom.xml
  • text_utils/src/main/java/com/testsigma/addons/web/ReplaceTextInFileWebAction.java
  • text_utils/src/main/java/com/testsigma/addons/web/ReplaceTextWithRegexWebAction.java
  • text_utils/src/main/java/com/testsigma/addons/web/ReplaceWordAtOccurrenceInFileWebAction.java
  • text_utils/src/main/java/com/testsigma/addons/web/ReplaceWordInFileWebAction.java
  • text_utils/src/main/resources/testsigma-sdk.properties

📝 Walkthrough

Walkthrough

This PR introduces a new Maven-based text_utils module with project configuration and four new WebAction classes that perform file text manipulation operations. These actions support both local files and remote sources (URLs), enabling text replacement via markers, regex patterns, occurrence indices, and exact word matching, with results stored in runtime variables.

Changes

Cohort / File(s) Summary
Maven Configuration
text_utils/pom.xml
Defines Maven project coordinates (com.testsigma.addons:text_utils:1.0.0), Java 11 compatibility, core dependencies (SDK, Lombok, JUnit, TestNG, Selenium, Jackson), and build plugins (maven-shade-plugin, maven-source-plugin) for packaging and source attachment.
WebAction Implementations
text_utils/src/main/java/com/testsigma/addons/web/ReplaceTextInFileWebAction.java, ReplaceTextWithRegexWebAction.java, ReplaceWordAtOccurrenceInFileWebAction.java, ReplaceWordInFileWebAction.java
Four new WebAction classes providing file-based text replacement functionality. Each class supports local and remote (URL) file sources, performs distinct text processing (marker-based, regex, occurrence index, or whole-word replacement), reads/writes file content, and stores resulting paths in runtime variables. All include consistent error handling and convertToFile helper methods.
SDK Configuration
text_utils/src/main/resources/testsigma-sdk.properties
Adds SDK API key property for integration with Testsigma SDK.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested reviewers

  • Ganesh-Testsigma
  • vigneshtestsigma

Poem

🐰 Four actions hop into the code,
Text replacement down the file road,
From markers and regex they play,
URLs and files save the day,
Runtime variables store the way! 📝✨

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/CUS-10884-Added-class-to-perform-actions-on-text-file

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants