Skip to content

Commit 0f427ae

Browse files
authored
Merge pull request #29 from HtmlUnit/feature/appveyor-build
Add AppVeyor build
2 parents 23c22fc + 896f5a7 commit 0f427ae

5 files changed

Lines changed: 110 additions & 83 deletions

File tree

NHtmlUnit.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1818
ProjectSection(SolutionItems) = preProject
1919
.gitignore = .gitignore
2020
.travis.yml = .travis.yml
21+
appveyor.yml = appveyor.yml
2122
clean.cmd = clean.cmd
2223
LICENSE-HtmlUnit.txt = LICENSE-HtmlUnit.txt
2324
LICENSE.txt = LICENSE.txt

README.md

Lines changed: 67 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,103 @@
1-
NHtmlUnit
2-
=========
1+
# NHtmlUnit
32

4-
[![Build Status](https://travis-ci.org/HtmlUnit/NHtmlUnit.svg?branch=master)](https://travis-ci.org/HtmlUnit/NHtmlUnit)
3+
| | **Status** |
4+
| ---------------------: | :------------------------ |
5+
| **GitHub** | [![GitHub release][1]][2] |
6+
| **NuGet** | [![NuGet][3]][4] |
7+
| **Travis** (Linux) | [![Master][5]][6] |
8+
| **AppVeyor** (Windows) | [![Master][7]][8] |
9+
| **Codefactor** | [![Codefactor][9]][10] |
510

6-
NHtmlUnit is a .NET wrapper of [HtmlUnit](http://htmlunit.sourceforge.net/);
7-
a "GUI-less browser for Java programs".
811

9-
Introduction
10-
----------
12+
NHtmlUnit is a .NET wrapper of [HtmlUnit][htmlunit]; a "GUI-less browser for
13+
Java programs".
1114

12-
We really like the HtmlUnit project, which enables headless web testing without needing
13-
to have a complete browser running. By using [IKVM](http://www.ikvm.net/) it is possible
15+
## Introduction
16+
17+
We really like the HtmlUnit project, which enables headless web testing without
18+
needing to have a complete browser running. By using [IKVM][ikvm] it is possible
1419
to convert the HtmlUnit Java library for use on Microsoft's .NET platform.
1520

1621
However, it doesn't feel very natural to use a Java library in a .NET language,
17-
and therefore we created an HtmlUnit wrapper written in C#, so you can write tests for
18-
your web pages in clean C# code (or any code running on the .NET platform).
22+
and therefore we created an HtmlUnit wrapper written in C#, so you can write
23+
tests for your web pages in clean C# code (or any code running on the .NET
24+
platform).
1925

20-
Downloading NHtmlUnit
21-
---------------------
26+
## Downloading NHtmlUnit
2227

23-
The recommended way to [download NHtmlUnit](https://nuget.org/packages/NHtmlUnit) is
24-
through its NuGet package. If you want to build it yourself, read the next section.
28+
The recommended way to [download NHtmlUnit][nuget] is through its NuGet package.
29+
If you want to build it yourself, read the next section.
2530

26-
Building NHtmlUnit
27-
------------------
31+
## Building NHtmlUnit
2832

29-
If you want to build your own version of NHtmlUnit, you can use MSBuild or Visual Studio
30-
2010.
33+
If you want to build your own version of NHtmlUnit, you can use MSBuild or
34+
Visual Studio 2010 or newer.
3135

3236
After building you can find `NHtmlUnit.dll` plus its dependencies here:
3337

3438
* `app\NHtmlUnit\bin\Debug`
3539
* `app\NHtmlUnit\bin\Release`
3640

37-
Usage
38-
-----
41+
## Usage
3942

40-
For now there is no manual or API reference written for NHtmlUnit. You can however use the
41-
[HtmlUnit reference](http://htmlunit.sourceforge.net/gettingStarted.html), as this wrapper
42-
almost completely reflects the original API.
43+
For now there is no manual or API reference written for NHtmlUnit. You can
44+
however use the [HtmlUnit reference][reference], as this wrapper almost
45+
completely reflects the original API.
4346

44-
The difference is that Java iterators, lists and collections are exposed as their
45-
.NET-friendly counterparts (`IEnumerable`, `IList` and `ICollection`). In addition,
46-
properties are "real" .NET properties, so `obj.getSomething()` and `obj.setSomething()` is
47-
exposed as `obj.Something` with a public getter and setter.
47+
The difference is that Java iterators, lists and collections are exposed as
48+
their .NET-friendly counterparts (`IEnumerable`, `IList` and `ICollection`). In
49+
addition, properties are "real" .NET properties, so `obj.getSomething()` and
50+
`obj.setSomething()` is exposed as `obj.Something` with a public getter and
51+
setter.
4852

49-
NHtmlUnitGenerator
50-
------------------
53+
## NHtmlUnitGenerator
5154

52-
The `NHtmlUnitGenerator` executable only needs to be run when the HtmlUnit jar file has
53-
changed. When `NHtmlUnitGenerator` is run it will overwrite all files in
54-
`app\NHtmlUnit\Generated`.
55+
The `NHtmlUnitGenerator` executable only needs to be run when the HtmlUnit jar
56+
file has changed. When `NHtmlUnitGenerator` is run it will overwrite all files
57+
in `app\NHtmlUnit\Generated`.
5558

5659
Note that it doesn't do anything with the project files, so if classes are added or
5760
removed from the origin HtmlUnit jar file this will not be synchronized. You have to
5861
manually add new files to the project.
5962

60-
License
61-
-------
63+
## License
6264

6365
NHtmlUnit is licensed under the Apache License Version 2.0, which is the same
6466
license used for HtmlUnit.
6567

66-
Technical details
67-
-----------------
68+
## Technical details
69+
70+
NHtmlUnit has in large parts been auto-generated using the HtmlUnit jar file as
71+
input to the excellent [IKVM][ikvm] project. How it is generated can be seen in
72+
the `Make.cmd` file located inside the `lib/NHtmlUnit` folder.
73+
74+
Although we consider NHtmlUnit itself to be of decent quality, the
75+
NHtmlUnitGenerator is basically a large hack.
6876

69-
NHtmlUnit has in large parts been auto-generated using the HtmlUnit jar file as input
70-
to the excellent [IKVM](http://www.ikvm.net/) project. How it is generated can be seen
71-
in the `Make.cmd` file located inside the `lib/NHtmlUnit` folder.
77+
## Future
7278

73-
Although we consider NHtmlUnit itself to be of decent quality, the NHtmlUnitGenerator
74-
is basically a large hack.
79+
A complete rewrite of the NHtmlUnitGenerator using [Mono.Cecil][cecil] would be
80+
nice, although we're unsure exactly how much this would do for the final
81+
product.
7582

76-
Future
77-
------
83+
## Authours
7884

79-
A complete rewrite of the NHtmlUnitGenerator using [Mono.Cecil](http://www.mono-project.com/Cecil)
80-
would be nice, although we're unsure exactly how much this would do for the final product.
85+
NHtmlUnit was written by @asbjornu and @beewarloc.
8186

82-
Authours
83-
--------
87+
<!-- Footnote links: -->
8488

85-
NHtmlUnit was written by @asbjornu and @beewarloc.
89+
[1]: https://img.shields.io/github/release/HtmlUnit/NHtmlUnit.svg
90+
[2]: https://github.com/HtmlUnit/NHtmlUnit/releases/latest
91+
[3]: https://img.shields.io/nuget/v/NHtmlUnit.svg
92+
[4]: https://www.nuget.org/packages/NHtmlUnit
93+
[5]: https://travis-ci.org/HtmlUnit/NHtmlUnit.svg?branch=master
94+
[6]: https://travis-ci.org/HtmlUnit/NHtmlUnit
95+
[7]: https://img.shields.io/appveyor/ci/HtmlUnit/NHtmlUnit/master.svg
96+
[8]: https://ci.appveyor.com/project/HtmlUnit/NHtmlUnit/branch/master
97+
[9]: https://www.codefactor.io/repository/github/htmlunit/nhtmlunit/badge/master
98+
[10]: https://www.codefactor.io/repository/github/htmlunit/nhtmlunit/overview/master
99+
[htmlunit]: http://htmlunit.sourceforge.net/
100+
[ikvm]: http://www.ikvm.net/
101+
[nuget]: https://nuget.org/packages/NHtmlUnit
102+
[reference]: http://htmlunit.sourceforge.net/gettingStarted.html
103+
[cecil]: http://www.mono-project.com/Cecil
Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,19 @@
22
<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
33
<metadata>
44
<id>NHtmlUnit</id>
5-
<version>2.19.0.0</version>
5+
<version>$version$</version>
66
<title>NHtmlUnit</title>
7-
<authors>OKB AS</authors>
8-
<owners>OKB AS</owners>
7+
<authors>PayEx AS</authors>
8+
<owners>PayEx AS</owners>
99
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
1010
<projectUrl>https://github.com/HtmlUnit/NHtmlUnit</projectUrl>
1111
<requireLicenseAcceptance>false</requireLicenseAcceptance>
1212
<description>NHtmlUnit is a .NET wrapper of HtmlUnit; a "GUI-less browser for Java programs". It allows you to write code to test web applications with a headless, automated browser.</description>
1313
<releaseNotes>Updated to version 7.4.5196 of IKVM.</releaseNotes>
14-
<copyright>Copyright © OKB AS 2016</copyright>
14+
<copyright>Copyright © PayEx AS 2016</copyright>
1515
<tags>testing htmlunit nhtmlunit headless browser</tags>
16-
<dependencies>
17-
<dependency id="IKVM" version="7.4.5196.0" />
18-
</dependencies>
19-
<frameworkAssemblies />
20-
<references />
2116
</metadata>
2217
<files>
23-
<file src="app\NHtmlUnit\bin\Release\HtmlUnit.dll" target="lib/net45" />
24-
<file src="app\NHtmlUnit\bin\Release\NHtmlUnit.dll" target="lib/net45" />
18+
<file src="bin\Release\HtmlUnit.dll" target="lib/net45" />
2519
</files>
26-
</package>
20+
</package>

appveyor.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
install:
2+
- choco install gitversion.portable -pre -y
3+
4+
before_build:
5+
- nuget.exe restore NHtmlUnit.sln -verbosity detailed
6+
- ps: gitversion /l console /output buildserver
7+
8+
build:
9+
project: NHtmlUnit.sln
10+
11+
configuration:
12+
- Release
13+
14+
test:
15+
assemblies:
16+
- 'tests/**/bin/*/*Tests.dll'
17+
18+
after_build:
19+
- ps: |
20+
Write-Host "nuget pack version $env:GitVersion_NuGetVersion"
21+
nuget.exe pack app/NHtmlUnit/NHtmlUnit.csproj -Verbosity detailed -Symbols -Properties Configuration=Release -Version $env:GitVersion_NuGetVersion
22+
23+
artifacts:
24+
- path: './NHtmlUnit*.nupkg'
25+
26+
deploy:
27+
- provider: NuGet
28+
api_key:
29+
secure: KdnSwO+azzpO5BT7wBbTMrngrcZ6737p4JNDbxo2APhrFFssLPbctMQr7v1YUUvg
30+
on:
31+
appveyor_repo_tag: true
32+
33+
notifications:
34+
on_build_success: false
35+
on_build_failure: false
36+
on_build_status_changed: true

nuget.cmd

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)