Procedure to create test base based on a production base copy
For tests, validations of new updating, simulations of errors and adjustments, you must have test base, which can be a production base copy. Below procedure to create it:
- Stop all Protheus services (Application Server, Licenses Server, DBAccess)
- Make a copy of the root folder of Protheus (Ex.: C:\TOTVS 12)
- In the copy folder, open file appserver.ini
- For better identification, change the [Ambiente] name
- In the section [Service], change the rows Name= e DisplayName=
- If a test base is in the same server of the production base, change the port in section [TCP]
- In the environment section, adjust paths of folders for the name of the renamed folder - If section [HTTP], change port
- If you use database separated from Production, create a base in SGBD (or make a copy of the main database), configure the ODBC, then point to the configurations of this base in the section [DBAccess] or rows DB of the environment
After the configuration, start Protheus of the Test base in console mode (creates a shortcut for the executable and add command - console after the path of the executable in the shortcut Proprieties) or create a service to the executable (command appserver.exe -install by Prompt of Command, in the appserver.exe folder).
To configure the access by SmartClient to this base, you can create a copy of Smartclient folder for this base, or use the same Production, changing the section [TCP] of the file smartclient.ini. See configurations below:
1. If you use a copy of the Smartclient folder:
- After copying, open file smartclient.ini
- In the section [TCP], change the port for which it was defined in the appserver.ini file (if the base was put in other physical server, change the row Server as well, adding address of the server IP)
- In the section [Config], in the row EnvServer, delete the content, add the environment name you defined in the appserver.ini file
- When accessing by the shortcut of this Smartclient, it is connected in the Test base
2. If you use the same Smartclient or the production:
- Open file smartclient.ini of production
- Copy section [TCP], and past below
- Switch the name of the second section TCP to [TCP-Teste], for example
- In this section, change the port that was defined in the file appserver.ini (if the base was put in other physical server, change the row Server as well, add the server IP address)
- In the section [Config], in the row EnvServer, after the name of the production environment, add a comma and the name of the environment you defined in the appserver.ini file
- When opening the Smartclient, in Communication in the customer, alternate between the Production TCP and the TCP-Teste. And in an Environment in the server, alternate between the name of the Production Environment and the Test Environment
Below an example of configuration of the smartclient.ini file and the connection screen with the options:
[Config]
lastmainprog=SIGAADV,SIGAMDI
envserver=P12,P12-Teste
[Drivers]
active=TCP,TCP-Teste
[TCP]
server=localhost
port=1217
[TCP-Teste]
server=localhost
port=1219
