Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md
Ocaramba
Cross-Platform C# Framework to automate tests using Selenium WebDriver
Test Framework was designed in Objectivity to propose a common way how people should create Selenium WebDriver tests.
Project API documentation can be found here: http://Accenture.github.io/Ocaramba
It provides the following features:
- .NET 8.0 supported
- Cross-Platform Windows, Linux and macOS systems supported
- Supports Appium-based UI automation of many app platforms, including mobile e.g. iOS, Android, Tizen, more details here
- Supports continuous integration tools like Azure DevOps, Teamcity, Jenkins and others.
- Ready for parallel tests execution, more details here
- Possibility to use MSTest, NUnit or xUNIT framework
- Specflow ready
- Written entirely in C#
- Contains example projects how to use it
- Allows using Chrome, Firefox, Edge Chromium, Safari or Internet Explorer
- Overrides browser profile preferences, pass arguments to browsers, installs browser extensions, loading default firefox profile, Headless mode, more details here
- Extends Webdriver by additional methods like JavaScriptClick, WaitForAjax, WaitForAngular, etc., more details here
- Automatically waits when locating element for specified time and conditions, GetElement method instead of Selenium FindElement, more details here
- Page Object Pattern
- Support for SeleniumGrid, Cross browser parallel test execution with SauceLab, TestingBot and Browserstack more details here, Advanced Browser Capabilities and Options more details here
- More common locators, e.g:
"//*[@title='{0}' and @ms.title='{1}']", more details here - Verify - asserts without stop tests, more details here
- Measures average and 90 Percentile action times, more details here
- DataDriven tests from Xml, Csv and Excel files for NUnit and Xml, Csv for MSTest with examples, more details NUnit, MsTest
- Visual Testing - browser screenshot of the element, more details here
- Logging with NLog, EventFiringWebDriver logs, more details here
- Files downloading (Firefox, Chrome), more details here
- Possibility to send SQL or MDX queries (only .NET Framework)
- Possibility of debugging framework installed from nuget package with sourcelink, more details here.
- AngularJS support, more details here.
- Possibility to check for JavaScript errors from the browser, more details here.
- Instruction on how to run Ocaramba tests with Docker container, more details here.
- ExtentReports support, more details here.
For all documentation, visit the Ocaramba Wiki.
Projects examples of using Test Framework :
- Ocaramba.Tests.Angular for AngularJS
- Ocaramba.Tests.Features for Specflow
- Ocaramba.Tests.MsTest for MsTest
- Ocaramba.Tests.NUnit for NUnit
- Ocaramba.Tests.NUnitExtentReports for NUnit featuring test execution HTML report based on ExtentReports framework
- Ocaramba.Tests.xUnit for xUnit
- Ocaramba.Tests.PageObjects for Page Object Pattern
- Ocaramba.Documentation.shfbproj for building API documentation
- Ocaramba.Tests.CloudProviderCrossBrowser for cross browser parallel test execution with BrowserStack\SauceLabs\TestingBot\SeleniumGrid
- Ocaramba.UnitTests for unit test of framework
- Ocaramba.Tests.Appium for Appium-based Android UI tests
NUnit Example Test:
namespace Ocaramba.Tests.NUnit.Tests { using global::NUnit.Framework; using Ocaramba.Tests.PageObjects.PageObjects.TheInternet; [Parallelizable(ParallelScope.Fixtures)] public class JavaScriptAlertsTestsNUnit : ProjectTestBase { [Test] public void ClickJsAlertTest() { var internetPage = new InternetPage(this.DriverContext).OpenHomePage(); var jsAlertsPage = internetPage.GoToJavaScriptAlerts(); jsAlertsPage.OpenJsAlert(); jsAlertsPage.AcceptAlert(); Assert.AreEqual("You successfuly clicked an alert", jsAlertsPage.ResultText); } } }
NUnit Example Page Object:
namespace Ocaramba.Tests.PageObjects.PageObjects.TheInternet { using System; using System.Globalization; using NLog; using Ocaramba; using Ocaramba.Extensions; using Ocaramba.Types; using Ocaramba.Tests.PageObjects; public class InternetPage : ProjectPageBase { private static readonly Logger Logger = LogManager.GetCurrentClassLogger(); /// <summary> /// Locators for elements /// </summary> private readonly ElementLocator linkLocator = new ElementLocator(Locator.CssSelector, "a[href='/{0}']"); public InternetPage(DriverContext driverContext) : base(driverContext) { } public JavaScriptAlertsPage GoToJavaScriptAlerts() { this.Driver.GetElement(this.linkLocator.Format("javascript_alerts")).Click(); return new JavaScriptAlertsPage(this.DriverContext); } } }
Where to start?
- See Getting started.
Checkout the code or get it from nuget.org
- Ocaramba
- OcarambaLite
- lighten version without selenium drivers
关于 About
C# Framework to automate tests using Selenium WebDriver
chromedata-drivenfirefoxiemstestnunitparallelsafariselenium-webdriverspecflowtesttest-automationxunit
语言 Languages
C#94.9%
PowerShell3.1%
Dockerfile0.7%
Shell0.7%
Gherkin0.6%
提交活跃度 Commit Activity
代码提交热力图
过去 52 周的开发活跃度185
Total Commits峰值: 19次/周
LessMore