Home
Web CMS (TeamSite)
Unit Testing of WFTs and IPLs
Balu110
Currently I am developing & testing .ipls and wfts in Solaris. But I would like to know is there way to do the unit test of these files in Windows based client machine and deploy them in to Solaris. This will help me to reduce the development & testing time.
Currently we don't have any license for Windows and also no samba access to our development servers.
Thanks
Bala
Find more posts tagged with
Comments
Migrateduser
Bala,
I have been in a similar environment at times, but you should be able to develop and test your IPL's from any client machine. Writing your code such that it incorporates logging to files is an effective means of developing and testing at the same time.
Dave
Current Environment(s):
(1) TS 6.1 SP1 on W2K3
(2) TS 6.1 SP2 on W2K
(3) TS 6.1 on W2K
Adam Stoller
Well - if you don't have a Windows TeamSite server - then trying to unit test things on Windows is kind of out of the question - especially as far as wfts go.
Perl scripts you might be able to unit-test portions of -- those pieces which do not rely on any TeamSite modules nor any other aspect specific to the TeamSite environment -- essentially you can work on benchmarking algorithms in subroutines to try to make them more efficient - but that's about it.
If you do have (get) a Windows TeamSite server - you still have to deal with making sure your code is portable across platforms and avoid doing anything explicitly windows-centric in your code as much as possible.
For this - you'll be doing things like always making sure all path information uses forward-slashes (
$foo =~ tr|\\|/|;
) or modifying every single path-related regex to use both kinds of path separators [ugh] (
if ($foo =~ m|[\\/]somedir[\\/]anotherdir[\\/]filename|){...}
). If you need to use Windows-specific modules for things like accessing group information - you need to do it within an eval statement that's within a conditional statement - something like:
if ($^O eq "MSWin32"){
eval(qq(use "Win32API::Net"
);
if ($
@)
{ ...
error
... }
...
}
and you'll have to be wary of anyplace where you explicitly place the path to something like iwhome (e.g. in
#!
lines at the top of Perl scripts) because there is no way that the path will be the same on both platforms.
There are probably some other things to consider too - but the above should give you a rough idea of what you'd be letting yourself in for trying to do this kind of mixed-platform development.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com