[mapguide-commits] r10122 - in branches/4.0/MgDev: . UnitTest
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Sat Feb 8 13:50:12 PST 2025
Author: jng
Date: 2025-02-08 13:50:12 -0800 (Sat, 08 Feb 2025)
New Revision: 10122
Modified:
branches/4.0/MgDev/UnitTest/run_server_tests.bat
branches/4.0/MgDev/UnitTest/run_web_tests.bat
branches/4.0/MgDev/UnitTest/test_readme.txt
branches/4.0/MgDev/build.bat
Log:
Update test suite documentation
Modified: branches/4.0/MgDev/UnitTest/run_server_tests.bat
===================================================================
--- branches/4.0/MgDev/UnitTest/run_server_tests.bat 2025-02-08 21:27:11 UTC (rev 10121)
+++ branches/4.0/MgDev/UnitTest/run_server_tests.bat 2025-02-08 21:50:12 UTC (rev 10122)
@@ -90,9 +90,9 @@
echo Please use the format:
:help_show
echo ************************************************************************
-echo run_tests.bat [-h]
-echo [-s=ServerBinPath]
-echo [-sts=ServerTestScope]
+echo run_server_tests.bat [-h]
+echo [-s=ServerBinPath]
+echo [-sts=ServerTestScope]
echo ServerPath: -s[erverpath]=path to your server bin directory
echo ServerTestScope: -sts=The server test suite to run
echo ************************************************************************
Modified: branches/4.0/MgDev/UnitTest/run_web_tests.bat
===================================================================
--- branches/4.0/MgDev/UnitTest/run_web_tests.bat 2025-02-08 21:27:11 UTC (rev 10121)
+++ branches/4.0/MgDev/UnitTest/run_web_tests.bat 2025-02-08 21:50:12 UTC (rev 10122)
@@ -175,7 +175,21 @@
echo ************************************************************************
echo run_web_tests.bat [-h]
echo [-m=MapAgentBase]
-echo MapAgentBase: -m=Base domain/port of mapagent [default: localhost:8018]
+echo [-t=TestSuite]
+echo [-td=TestDataPath]
+echo [-w=WebConfigPath]
+echo [-d=MentorDictionaryPath]
+echo [-php=PhpDir]
+echo MapAgentBase: -m=Base domain/port of mapagent [default: localhost:8018]
+echo TestSuite: -t=all(default),
+echo dotnet,
+echo java,
+echo php,
+echo mapagent
+echo TestDataPath: -td=Root directory for test data
+echo WebConfigPath: -w=Path to webconfig.ini
+echo MentorDictionaryPath: -d=Path to CS-Map dictionaries
+echo PhpDir: -php=Path to directory containing php.exe
echo ************************************************************************
:quit
SET TYPEACTION=
Modified: branches/4.0/MgDev/UnitTest/test_readme.txt
===================================================================
--- branches/4.0/MgDev/UnitTest/test_readme.txt 2025-02-08 21:27:11 UTC (rev 10121)
+++ branches/4.0/MgDev/UnitTest/test_readme.txt 2025-02-08 21:50:12 UTC (rev 10122)
@@ -1,77 +1,62 @@
MapGuide Test Suite Overview
============================
-The MapGuide Test Suite contains the test data and applications that can be used to validate and verify a given installation of MapGuide
+The MapGuide Test Suite contains the test data and applications that can be used to validate and verify both server and web tiers of a given installation of MapGuide
-The test data in this suite is required for the MapGuide Server tests to run properly
+The test data in this suite is provided and required for the tests to run properly
Usage
=====
-To run the test suite on Windows, run the command as follows:
+To run the server test suite on Windows, run the command as follows:
-run_tests.bat [-p=Platform]
- [-t=TestSuite]
- [-m=MapAgent]
- [-w=WebRoot]
- [-s=ServerPath]
- [-ws=WebServerName]
- [-wp=WebServerPort]
- [-iw]
+run_server_tests.bat [-h]
+ [-s=ServerBinPath]
+ [-sts=ServerTestScope]
-To run the test suite on Linux, run the command as follows:
-
-run_tests.sh [-p=Platform]
- [-t=TestSuite]
- [-m=MapAgent]
- [-w=WebRoot]
- [-s=ServerPath]
-
Where the parameters are:
-Use Integrated PHP Web Server: -iw
+ServerPath: -s[erverpath]=path to your server bin directory
+ServerTestScope: -sts=The server test suite to run
-Platform: -p[latform]=x86 (default)
- x64
+To run the web tier test suite on Windows, run the command as follows:
-TestSuite: -t[est]=server (default)
- php
- phpagent
- dotnet
- java
- all
-
-MapAgent: -m[apagent]=<your mapagent url>
+run_web_tests.bat [-h]
+ [-m=MapAgentBase]
+ [-t=TestSuite]
+ [-td=TestDataPath]
+ [-w=WebConfigPath]
+ [-d=MentorDictionaryPath]
+ [-php=PhpDir]
-WebRoot: -w[ebroot]=<path to your web root www>
+Where the parameters are:
-ServerPath: -s[erverpath]=<path to your server bin directory>
+MapAgentBase: -m=Base domain/port of mapagent [default: localhost:8018]
+TestSuite: -t=all(default),
+ dotnet,
+ java,
+ php,
+ mapagent
+TestDataPath: -td=Root directory for test data
+WebConfigPath: -w=Path to webconfig.ini
+MentorDictionaryPath: -d=Path to CS-Map dictionaries
+PhpDir: -php=Path to directory containing php.exe
-WebServerName: -ws=Host name of web server
-
-WebServerPort: -wp=Port number of web server
-
Requirements
============
+
- An installed/pre-configured copy of MapGuide Open Source, this could be installed by the Windows installer, or configured via the InstantSetup utility
- - Java SDK (if running the Java test suite). It must be the same bitness as your MapGuide Server. If you have a 32-bit MapGuide installed, you must use a 32-bit JDK
- - Apache Ant (if running the Java test suite)
- - .net Framework 4.5 (if running the .net test suite)
+ - Java SDK (if running the Java test suite). It must be the same bitness as your MapGuide Server (ie: 64-bit)
General Notes (Windows):
========================
-If your MapGuide Server is running as a service, it has to be stopped when running any test suite, as they will start the mgserver executable before
-running their tests, and tear it down when finished.
+If your MapGuide Server is running as a service, it has to be stopped when running the server test suite, as run_server_tests.bat will start the mgserver
+executable itself
You must have the following environment variables set:
- JAVA_HOME points to an installation of the Java SDK of the same bitness as the installation of MapGuide you are testing against
- - PATH contains the path to your installation of Apache Ant
-You must have a copy of the Sheboygan dataset in the UnitTest/TestData/Samples/Sheboygan directory. You can either download a copy and put it in this
-directory, or if you have 7-zip in the PATH environment variable, you can run the build.bat file in this direcotry to build Sheboygan.mgp from the existing
-data files.
-
If running on an installation of MapGuide installed with the Windows installer, you will need elevated privileges to run this batch file in order
to run the server test suite as part of preparation the batch file will have to copy all the required test data to a location under Program Files, an
area that needs elevated privileges to write files to.
@@ -80,7 +65,7 @@
installation, don't expect the Java test suite to run or pass. As a general rule, the following test suites can be run under the given conditions:
* server: always (provided you have elevated privileges for a non-InstantSetup installation)
- * php: always (provided you supply the correct WebRoot path)
- * dotnet: You must supply the correct WebRoot path and mapviewernet\bin is assumed to exist under this path and contains the required .net assemblies and dlls
- * java: You must supply the correct WebRoot path and WEB-INF\lib is assumed to exist under this path and contains the required JAR files
+ * php: always (provided you supply the correct PhpDir path)
+ * dotnet: always (the test runner is self-contained)
+ * java: You must supply the JAVA_HOME environment variable
* all: All of the above conditions must be satisfied
\ No newline at end of file
Modified: branches/4.0/MgDev/build.bat
===================================================================
--- branches/4.0/MgDev/build.bat 2025-02-08 21:27:11 UTC (rev 10121)
+++ branches/4.0/MgDev/build.bat 2025-02-08 21:50:12 UTC (rev 10122)
@@ -480,9 +480,9 @@
popd
REM We copy to this level so that test data relative path references don't need changing
%XCOPY% "%MG_UNIT_TEST%\WebTier\MapAgentIntegration" "%MG_OUTPUT_TEST%\UnitTest\MapAgent\Integration"
-rem copy /Y test_readme.txt "%MG_OUTPUT_TEST%"
-rem copy /Y run_tests.bat "%MG_OUTPUT_TEST%"
-rem copy /Y run_tests.sh "%MG_OUTPUT_TEST%"
+copy /Y "%MG_UNIT_TEST%\test_readme.txt" "%MG_OUTPUT_TEST%"
+copy /Y "%MG_UNIT_TEST%\run_server_tests.bat" "%MG_OUTPUT_TEST%"
+copy /Y "%MG_UNIT_TEST%\run_web_tests.bat" "%MG_OUTPUT_TEST%"
goto quit
:error
More information about the mapguide-commits
mailing list