Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add testing documentation for webforJ applications #382

Merged
merged 4 commits into from
Dec 16, 2024

Conversation

hyyan
Copy link
Member

@hyyan hyyan commented Dec 6, 2024

No description provided.

- `webforJ` app is correctly set up and running on your local server.
- You have installed:
- Selenium Java bindings.
- A compatible WebDriver for your browser (e.g., `ChromeDriver` or `GeckoDriver`).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Google.Parens] Use parentheses judiciously.

- `webforJ` app is correctly set up and running on your local server.
- You have installed:
- Selenium Java bindings.
- A compatible WebDriver for your browser (e.g., `ChromeDriver` or `GeckoDriver`).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Google.Latin] Use 'for example' instead of 'e.g.'.

</Head>


# Testing in webforJ
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[Google.Headings] 'Testing in webforJ' should use sentence-style capitalization.


# Testing in webforJ

Testing in `webforJ` applications combines traditional Java unit testing with end-to-end (E2E) testing to ensure robust functionality and user experience.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[Google.WordList] Use 'capability' or 'feature' instead of 'functionality'.

## End-to-End testing

Since `webforJ` generates dynamic, single-page web applications, end-to-end testing is essential for validating user interactions and UI behavior. Tools like Selenium and Playwright allow you to:
- Automate browser interactions (e.g., button clicks, form submissions).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Google.Parens] Use parentheses judiciously.

## End-to-End testing

Since `webforJ` generates dynamic, single-page web applications, end-to-end testing is essential for validating user interactions and UI behavior. Tools like Selenium and Playwright allow you to:
- Automate browser interactions (e.g., button clicks, form submissions).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Google.Latin] Use 'for example' instead of 'e.g.'.


Since `webforJ` generates dynamic, single-page web applications, end-to-end testing is essential for validating user interactions and UI behavior. Tools like Selenium and Playwright allow you to:
- Automate browser interactions (e.g., button clicks, form submissions).
- Verify the rendering and functionality of dynamic components.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[Google.WordList] Use 'capability' or 'feature' instead of 'functionality'.


The `PropertyDescriptorTester` in webforJ is a tool designed to simplify testing for **third-party web components** integrated into your app. It ensures that properties defined with [`PropertyDescriptor`](https://javadoc.io/doc/com.webforj/webforj-foundation/latest/com/webforj/component/element/PropertyDescriptor.html) are correctly linked to their getter and setter methods, and that default behaviors are consistent.

This is particularly useful when integrating third-party components that expose properties as part of their API, allowing you to validate their functionality without needing to write repetitive test logic.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[Google.WordList] Use 'capability' or 'feature' instead of 'functionality'.

- Skips fields annotated with `@PropertyExclude`.

2. **Resolve Methods**:
- Determines getter and setter methods based on standard conventions (`get<PropertyName>`/`set<PropertyName>`).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Google.Parens] Use parentheses judiciously.

- The `webforJ` app is correctly set up and running on your local server.
- You have installed:
- Playwright Java bindings.
- A compatible browser (Playwright can automatically install browsers during setup).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Google.Parens] Use parentheses judiciously.


# Testing in webforJ

Testing in webforJ applications combines traditional Java unit testing with end-to-end (E2E) testing to ensure robust functionality and user experience.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[Google.WordList] Use 'capability' or 'feature' instead of 'functionality'.

@hyyan hyyan marked this pull request as draft December 9, 2024 07:07
- The webforJ app is correctly set up and running on your local server.
- You have installed:
- Playwright Java bindings.
- A compatible browser (Playwright can automatically install browsers during setup).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Google.Parens] Use parentheses judiciously.

`}</style>
</Head>

# webforJ Testing
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[Google.Headings] 'webforJ Testing' should use sentence-style capitalization.

title: PropertyDescriptorTester
---

The `PropertyDescriptorTester` in webforJ simplifies testing for **third-party web components** integrated into your app. It validates that properties defined with [`PropertyDescriptor`](https://javadoc.io/doc/com.webforj/webforj-foundation/latest/com/webforj/component/element/PropertyDescriptor.html) are correctly linked to their getter and setter methods and ensures that default behaviors are handled consistently. This tool is especially useful for verifying the functionality of properties exposed by third-party components without requiring repetitive test logic.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[Google.WordList] Use 'capability' or 'feature' instead of 'functionality'.

@hyyan hyyan marked this pull request as ready for review December 11, 2024 12:28
@MatthewHawkins MatthewHawkins merged commit 837d0a6 into website Dec 16, 2024
1 check failed
@MatthewHawkins MatthewHawkins deleted the testing branch December 16, 2024 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants