How richmart87/playwrighttests works
PlaywrightTests is a .NET UI and REST API test suite for automationexercise.com, not the application itself. Its principal workflow is running feature tests against the site: browser tests use page objects and shared components, while API checks exercise REST behavior. The repository also supports account setup, categorized suites, configurable browser/trace behavior, and failure screenshots and traces. The README documents suite capabilities and structure; sampled source confirms browser setup, page-component construction, and artifact handling. Test-to-page call details and unsampled implementations are not shown, so those links are omitted.
Main entry points: HomePage.cs Home page · PlaywrightTestBase.cs Browser lifecycle · ApiTests.cs API tests · CartPage.cs Shopping cart
Components 27
Test suites
- API tests
Tests/ApiTests.cs - Home tests
Tests/HomePageTests.cs - Product tests
Tests/ProductsPageTests.cs - Cart tests
Tests/CartTests.cs - Login tests
Tests/LoginTests.cs - Signup tests
Tests/SignUpTests.cs - Smoke tests
Tests/SmokeTests.cs
Page objects
- Home page
Pages/HomePage.cs - Product listings
Pages/ProductsPage.cs - Product details
Pages/ProductDetailsPage.cs - Shopping cart
Pages/CartPage.cs - Login page
Pages/LoginPage.cs - Signup page
Pages/SignupPage.cs - Account status
Pages/AccountStatusPage.cs
Shared components
- Header
Components/HeaderComponent.cs - Product grid
Components/ProductGridComponent.cs - Category sidebar
Components/SidebarComponent.cs - Cart modal
Components/CartModalComponent.cs - Subscription form
Components/SubscriptionComponent.cs
Test runtime
- Browser lifecycle
PlaywrightTestBase.cs - Account API
TestData/AccountApi.cs - Test data factory
TestData/TestDataFactory.cs - Site endpoints
Config/TestSettings.cs - Run settings
Infrastructure/RunSettings.cs - Artifact paths
Infrastructure/ArtifactPaths.cs - Suite categories
Infrastructure/TestCategories.cs
Other components
- Test runner
Connections 21
- Test runner → API tests: runs API checks
README.md - Test runner → Home tests: runs UI checks
README.md - Test runner → Product tests: runs UI checks
README.md - Test runner → Cart tests: runs UI checks
README.md - Test runner → Login tests: runs UI checks
README.md - Test runner → Signup tests: runs UI checks
README.md - Test runner → Smoke tests: runs smoke checks
README.md - Home page → Header: constructs
Pages/HomePage.cs - Home page → Product grid: constructs
Pages/HomePage.cs - Home page → Category sidebar: constructs
Pages/HomePage.cs - Home page → Cart modal: constructs
Pages/HomePage.cs - Home page → Subscription form: constructs
Pages/HomePage.cs - Product details → Cart modal: constructs
Pages/ProductDetailsPage.cs - Shopping cart → Header: constructs
Pages/CartPage.cs - Shopping cart → Subscription form: constructs
Pages/CartPage.cs - Browser lifecycle → Run settings: reads settings
PlaywrightTestBase.cs - Browser lifecycle → Artifact paths: writes artifacts
PlaywrightTestBase.cs - API tests → Account API: uses account setup
README.md - Account API → Test data factory: creates test users
- API tests → Site endpoints: targets API
README.md - Browser lifecycle → Site endpoints: targets site
README.md