Skip Menu |

This queue is for tickets about the Term-Screen-Uni CPAN distribution.

Report information
The Basics
Id: 25790
Status: open
Priority: 0/
Queue: Term-Screen-Uni

People
Owner: Nobody in particular
Requestors: imacat [...] mail.imacat.idv.tw
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.04
Fixed in: (no value)



Subject: Allowing Automated CPAN Tests
Dear Daniel Podolsky, Hi. This is imacat from Taiwan. I'm current acting as a CPAN tester and running tests for all the uploaded CPAN packages daily. It seems that your Term-Screen-Uni-0.04 does not allow automated tests. It keeps wating key press from the console. In the case of automated tests that STDIN is closed, nothing can be returned from getch() and hence it enters an infinite loop. As a CPAN tester testing 40-50 modules per day, I really cannot test every package and check their input alone. Having such a package that does not satisfy without STDIN really frustrate me as it uses up all my CPU and system resources that I can contribute to other packages that need more tests. Could you please help solving this issue, by allowing that if nothing was obtained from getch() then stops testing? Thank you very much. You are greatly appreciated by the large CPAN family. I attached the last terminal screen below, in the hope that it helps. The automated tests hangs here. Please tell me if you need any more information. Thank you Test series for Screen.pm module for perl5 ==================== 1. Should be at row 2 col 3 (upper left is 0,0) 2. Last position -- should be 2 50. 3. Screen size: rows and columns. 4. Testing reverse mode, bold mode, and both together. 5. Testing clreol - The next 2 lines should end at col 20 and 30. 0---------10-------- 0---------10--------20-------- 0---------10--------20--------30--------40--------50--------60--------70------- 6. Clreos - Hit a key to clear all right and below: 7. Test insert and delete line - 15 deleted, and ... 13--------10--------20--------30--------40--------50--------60--------70------- ... this is where line 14 was 14--------10--------20--------30--------40--------50--------60--------70------- 16--------10--------20--------30--------40--------50--------60--------70------- 8. Key_pressed - Don't Hit a key in the next 5 seconds: HEY A KEY WAS HIT Hit a key in next 15 seconds: KEY HIT! ====================
From: TPABA [...] cpan.org
Unfortunately automated test of this module could not be allowed because of its nature. This module is for interaction with user. We have to test this module interacting properly, right? On Mon Mar 26 01:17:40 2007, IMACAT wrote: Show quoted text
> Dear Daniel Podolsky, > > Hi. This is imacat from Taiwan. I'm current acting as a CPAN > tester > and running tests for all the uploaded CPAN packages daily. > > It seems that your Term-Screen-Uni-0.04 does not allow automated > tests. It keeps wating key press from the console. In the case of > automated tests that STDIN is closed, nothing can be returned from > getch() and hence it enters an infinite loop. > > As a CPAN tester testing 40-50 modules per day, I really cannot > test > every package and check their input alone. Having such a package that > does not satisfy without STDIN really frustrate me as it uses up all > my > CPU and system resources that I can contribute to other packages that > need more tests. > > Could you please help solving this issue, by allowing that if > nothing was obtained from getch() then stops testing? Thank you very > much. You are greatly appreciated by the large CPAN family. > > I attached the last terminal screen below, in the hope that it > helps. The automated tests hangs here. Please tell me if you need > any > more information. Thank you > > Test series for Screen.pm module for perl5 > > ==================== > 1. Should be at row 2 col 3 (upper left is 0,0) > 2. Last position -- should be 2 50. > 3. Screen size: rows and columns. > > 4. Testing reverse mode, bold mode, and both together. > 5. Testing clreol - The next 2 lines should end at col 20 and 30. > 0---------10-------- > 0---------10--------20-------- > 0---------10--------20--------30--------40--------50--------60-------- > 70------- > 6. Clreos - Hit a key to clear all right and below: > 7. Test insert and delete line - 15 deleted, and ... > 13--------10--------20--------30--------40--------50--------60-------- > 70------- > ... this is where line 14 was > 14--------10--------20--------30--------40--------50--------60-------- > 70------- > 16--------10--------20--------30--------40--------50--------60-------- > 70------- > > 8. Key_pressed - Don't Hit a key in the next 5 seconds: HEY A KEY WAS > HIT > Hit a key in next 15 seconds: KEY HIT! > ====================
This test is primary created to test an ability of this module to interact with user. so automated test could not be performed.
This test is primary created to test an ability of this module to interact with user. so automated test could not be performed.
This test is primary created to test an ability of this module to interact with user. so automated test could not be performed.
On 2007-03-26 05:48:54 Mon, TPABA wrote: Show quoted text
> Unfortunately automated test of this module could not be allowed because > of its nature.
Dear Daniel Podolsky, I fully understand this, as I've read its tests. However, please also understand that we have to do automated tests for 40-50 uploaded CPAN modules per day, and Term-Screen-Uni prevents us from helping other module authors, as it hangs at the point of testing Term-Screen-Uni and all other modules that depend on Term-Screen-Uni. You may refer to Term-ReadLine-Perl for example on this: http://search.cpan.org/dist/Term-ReadLine-Perl/ Your help is greatly appreciated. Please tell me if you need any more information.
Ok, fine. Can you tell me is it possible to recognize in test script is it running in automated environment? By the way, did you contact Term-Screen author about this problem? My module is just a wrapper around his module. My test script is a copy of his one. On Mon Mar 26 06:47:27 2007, IMACAT wrote: Show quoted text
> On 2007-03-26 05:48:54 Mon, TPABA wrote:
> > Unfortunately automated test of this module could not be allowed because > > of its nature.
> > Dear Daniel Podolsky, > > I fully understand this, as I've read its tests. However, please > also understand that we have to do automated tests for 40-50 uploaded > CPAN modules per day, and Term-Screen-Uni prevents us from helping other > module authors, as it hangs at the point of testing Term-Screen-Uni and > all other modules that depend on Term-Screen-Uni. > > You may refer to Term-ReadLine-Perl for example on this: > > http://search.cpan.org/dist/Term-ReadLine-Perl/ > > Your help is greatly appreciated. Please tell me if you need any > more information.
On 2007-03-26 08:21:35 Mon, TPABA wrote: Show quoted text
> Ok, fine. Can you tell me is it possible to recognize in test script is > it running in automated environment?
There are several ways: 1. if (-t STDIN) { ... } 2. print "Press enter to start testing ... "; $_ = <STDIN>; # Enter is "\n". Automated tests will have no input and hence undef. if (defined $_) { ... } Show quoted text
> By the way, did you contact Term-Screen author about this problem? My > module is just a wrapper around his module. My test script is a copy of > his one.
Maybe I should. I have just tried it. It has exactly the same problem. I wonder why it is not on my list. Thank you for reminding me.