XPing365.Core 1.0.0-rc1

This is a prerelease version of XPing365.Core.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package XPing365.Core --version 1.0.0-rc1
NuGet\Install-Package XPing365.Core -Version 1.0.0-rc1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="XPing365.Core" Version="1.0.0-rc1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add XPing365.Core --version 1.0.0-rc1
#r "nuget: XPing365.Core, 1.0.0-rc1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install XPing365.Core as a Cake Addin
#addin nuget:?package=XPing365.Core&version=1.0.0-rc1&prerelease

// Install XPing365.Core as a Cake Tool
#tool nuget:?package=XPing365.Core&version=1.0.0-rc1&prerelease

About The Project

XPing365 SDK is designed to make eXternal Ping(s) to web applications to verify its availability and monitor its content by scraping data from the web pages. It allows users to parametrize URLs and generate hundrets of different queries.

Getting Started

XPing365 SDK can be installed via the NuGet package manager or .NET CLI. If you need help, please open an issue.

Installation using .NET CLI

dotnet add package XPing365.Core

Usage

In this section you will find 5 steps to start working with XPing 365 SDK. It is a small subset of what's possible with XPing 365 SDK.

var host = Host.CreateDefaultBuilder(args)
               .ConfigureServices(services =>
               {
                   services.AddHttpClient<IWebDataRetriever, WebDataRetriever>("httpClient", client => 
                   {
                       client.BaseAddress = new Uri("http://example.com/");
                   });
                   services.AddTransient<IDataParserFactory, DataParserFactory>();
                   services.AddTransient<IWebDataRetriever, WebDataRetriever>();
               })
               .Build();
  • Declare your page you're going to test
class BasicPage : HtmlSource
{
    [XPath("//head/title")]
    public string? Title { get; set; }

    [XPath("//body/h1")]
    public string? Header { get; set; }

    [XPath("//body/p")]
    public string? Paragraph { get; set; }
}
  • Get the WebDataRetriever object
var webDataRetriever = host.Services.GetRequiredService<IWebDataRetriever>();
  • Fetch the web page content
BasicPage? basicPage = await webDataRetriever.GetFromHtmlAsync<BasicPage>("/basic_page.html");
  • Assert your web page
Assert.AreEqaul(HttpStatusCode.OK, basicPage.ResponseCode); // or alternatively check property IsSuccessResponseCode
Assert.IsTrue(basicPage.ResponseSizeInBytes < 150000);
Assert.IsTrue(basicPage.RequestEndTime - basicPage.RequestStartTime <= TimeSpan.FromSeconds(5));
Assert.AreEqual("ExampleTile", basicPage.Title);
Assert.AreEqual("ExampleHeader", basicPage.Header);
Assert.AreEqual("ExampleParagraph", basicPage.Paragraph);
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on XPing365.Core:

Package Downloads
XPing365.Availability

XPing365 is open source .NET library written in C# that provides a set of tools to make it easy to write automated tests for web applications, as well as troubleshoot issues that may arise during testing. XPing365.Availability offers functionality to check server availability and the data it returns.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0-rc8 59 3/7/2024
1.0.0-rc7 50 2/21/2024
1.0.0-rc6 50 1/28/2024
1.0.0-rc5 49 1/20/2024
1.0.0-rc4 47 1/20/2024
1.0.0-rc2 106 8/22/2022
1.0.0-rc1 105 8/4/2022

Initial beta release of the first XPing365.Core package.