Developer How-To

From Contensive Wiki
Jump to: navigation, search

Setup a Selenium IDE Test Environment

Use these instructions to setup a Selendium-IDE test environment.

  1. Install the Selenium-IDE Firefox extension
  2. all tests are saved in the /testcases folder under the appropriate github repo
  3. all tests should be numbered (test1.html, test2.html, etc) and documented briefly in the wiki documentation page for the project.
  4. Never run test cases on production sites. We should expect them to be destructive.
  5. It should be assumed that the root developer login in always available.
  6. (developers only) When creating a test site, add the following code to the /includes/Contensiveconfig42.php page for the site to eliminate the frameworks serialized form system.
	// bypass form serial numbers for automated testing 
	$needle = 'ccFormSN" VALUE="';
	$snPos = stripos ( $s, $needle, 0 );
	while ($snPos !== false ) {
		$snPos += 17;
		$needle2 = '">';
		$snEnd = stripos( $s, $needle2, $snPos );
		$sn = substr($s, $snPos, ($snEnd - $snPos));
		$s = str_replace( $sn, "0",  $s );
		//$s .= '<br>ccFormSN sn=' . $sn;
		$snPos = stripos ( $s, $needle, $snEnd);
	return $s;

To create a new AWS instance

  • log into AWS
  • Under Images click AMIs
  • select Contensive41 --> right click on Contensive41 and launch a new instance
  • select general purpose t2.micro --> click next:
  • review launch and click next:
  • add storage change the size of root to 100gb
  • add new volume under device change to xvdf change size to 400gb
  • click next
  • name the key Use new sever Name
  • click next
  • In configure security setting select an existing security group
  • select production server, windows
  • review
  • launch

Assign an elastic Ip

  • in ec2 select elastic ip
  • under actions lallocate new address
  • for a windows server select VPC in the EIP dropdown
  • under actions associate the IP with the new instance created

Repairing a Microsoft Access Db

Use these steps to compact or repair an Access Db.

  1. Open the Upgrade folder.
  2. Shut down Contensive.
  3. Turn off auto start in application manager.
  4. Open the folder interpub/db and make a copy of the target database.
  5. Open odbc32 --> select the system dsn tab --> push ADD --> select the appropriate driver (ms-access driver)--> push finish -->
  6. select repair and find the newly copied db --> click ok --> close odbc32
  7. Go back into Interpub and copy the newly repaired db and rename it.
  8. now go back into odbc32 select the system DSN--> select add to create a new dsn --> select the ms access driver --> select the new db --> give it a new name (typically Incremented) --> click OK
  9. open app manager and rename the connection string
  10. restart contensive