Astro-SkyX
view release on metacpan or search on metacpan
SkyX_Test.pl view on Meta::CPAN
#!/usr/bin/perl -w
# Completed Module Tests. Not everything has been tested
# because I'm lazy.
# TheSkyX Objects
# Astro::SkyX::Application
# Astro::SkyX::ImageLink
# Astro::SkyX::ImageLinkResults
# Astro::SkyX::TheSkyXAction
#
# TheSky6 Classic Objects
# Astro::SkyX::sky6ObjectInformation
# Astro::SkyX::sky6DataWizard (Can run Query but not access data)
# Astro::SkyX::sky6DirectGuide
# Astro::SkyX::sky6MyFOVs
# Astro::SkyX::sky6RASCOMTheSky
# Astro::SkyX::sky6RASCOMTele
# Astro::SkyX::sky6Web
#
# CCDSoft Classic Objects
# Astro::SkyX::ccdsoftCamera
#
# Still need tests for:
# Astro::SkyX::sky6StarChart
# Astro::SkyX::sky6Utils
# Astro::SkyX::ccdsoftCameraImage
# Astro::SkyX::ccdsoftAutoguiderImage
#
# Modules I can't test:
# Astro::SkyX::sky6Dome (No Dome license)
# Astro::SkyX::sky6Raven (No Dome license)
# Astro::SkyX::sky6TheSky - This object has been depricated so not tested.
# Used for testing
#BEGIN { push @INC, "/path/to/SkyXPro/module" }
#
# Use the SkyX perl module
use Astro::SkyX;
# Global variables
use vars qw( $SX $Skysock $output $error $target );
#
$| = 1;
my $movetests = 0;
my $answer = '';
my $slewtarget = '';
print "\n\nWARNING: Executing module fuctions that move the telescope\n";
print " can result in damage to your telescope, mount, and accessories.\n";
print " Make sure your telescope is clear of obstructions, you pick\n";
print " a safe slew target and your observatory roof is open!\n";
print "\n\n To execute move telescope functions you must type YES at the\n";
print "prompt: ";
chomp ($answer = <>);
if ( $answer eq 'YES' ) {
$movetests = 1;
}
print "\n\n Enter a safe target (slew and info tests): ";
chomp ($slewtarget = <>);
if ( !$slewtarget ){
print "\n Exiting. No target selected\n";
exit;
}
########## Initialize the module and connect to TheSkyX ############
#change to IP if across network
initSX('localhost');
#initSX('192.168.3.12');
####################################################################
# This tests the raw Send/Get methods to send raw java script #
####################################################################
testSendGet();
####################################################################
# Is SkyX initialized? What version? This fully tests #
# the Astro::SkyX::Application module #
####################################################################
testApplication();
# Print out error from the last command if there was one.
print " SkyX module query to see if there was an error on the last command:\n";
print " " . $SX->getError() . "\n";
####################################################################
# Test TheSkyXAction class module. Fully tests the #
# Astro::SkyX::TheSkyXAction module. #
####################################################################
testTheSkyXAction();
####################################################################
# Tests for Astro::SkyX::sky6ObjectInformation module. #
####################################################################
testsky6ObjectInformation("$slewtarget");
####################################################################
# Tests for Astro::SkyX::sky6DataWizard module. #
####################################################################
# Query will run, but unsure how to access the results.
testsky6DataWizard("Objects on Virtual Sky.dbq");
####################################################################
# Tests for Astro::SkyX::sky6MyFOVs module. #
####################################################################
# WARNING: Do not have FOV's with single ticks (') in the name.
testsky6MyFOVs();
( run in 0.417 second using v1.01-cache-2.11-cpan-0b5f733616e )