Skip to content

Commit 9f535c0

Browse files
committed
More docs on remote tests
1 parent 7e2ce01 commit 9f535c0

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

Lombiq.Tests.UI.Samples/Tests/RemoteTests.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,26 @@ namespace Lombiq.Tests.UI.Samples.Tests;
1212
// to the internet.
1313

1414
// However, sometimes in addition to this, you also want to test remote apps available online, like running rudimentary
15-
// smoke tests on your production app (e.g.: Can people still log in? Are payments still working?). The UI Testing
15+
// smoke tests on your production app (e.g.: Can people still log in? Are payments still working?). You can also run
16+
// such tests in your pre-production environment (like staging) before rolling it out the production. The UI Testing
1617
// Toolbox also supports this. Check out the example below!
1718

1819
// Note how the test derives from RemoteUITestBase this time, not UITestBase. This is a generic base class for any
1920
// remote test. However, if you're testing an app behind Cloudflare, you might see requests rejected with an HTTP 403
2021
// due to Cloudflare's Bot Fight Mode; in that case, derive from CloudflareRemoteUITestBase instead after checking out
2122
// its documentation on how to set it up.
23+
24+
// While there may be some common code between local and remote tests, they cannot be the same, and the common code must
25+
// be in a project independent of the web app (which is not the case here for the sake of simplicity):
26+
// - In local tests, you have a much lower-level access to the app: E.g., you can access the Orchard Core log, use
27+
// shortcuts with all kinds of backdoors, and you can communicate directly with the Orchard Core shell (not just via
28+
// web APIs). You can also save a snapshot of the site's database and media. None of these are available (for a good
29+
// reason) when the app is deployed to a server: There, you interact with it just as any ordinary user.
30+
// - For local tests, you need to build the web app and all its dependencies. For remote tests, you only need the test
31+
// project and the UI Testing Toolbox.
32+
// - Some things are inherently different in a staging/production app, also on the UI. E.g., the app will load static
33+
// resources from a CDN, or the content will be more up-to-date.
34+
2235
public class RemoteTests : RemoteUITestBase
2336
{
2437
public RemoteTests(ITestOutputHelper testOutputHelper)

0 commit comments

Comments
 (0)