Re: [CODE4LIB] javascript testing?
For testing of the citeproc-js utility (used in Zotero and Mendeley bibliography managers), I use the DOH test framework from the Dojo project. When running code in Rhino (or other standalone interpreter such as jslibs/jshost), It provides a command-line test environment, similar to that used in Python and other scripting languages. For citeproc-js development I wanted to have a rapid command-line testing cycle, and DOH has worked out quite well for that. http://dojotoolkit.org/reference-guide/util/doh.html http://www.sitepen.com/blog/2008/04/15/unit-testing-custom-code-with-the-dojo-objective-harness/ https://bitbucket.org/fbennett/citeproc-js/src Frank Bennett
[CODE4LIB] Integrated Library Systems Librarian, University of Southern California
Please excuse for cross posting. The University of Southern California (USC) Libraries seek an experienced, service-oriented Integrated Library Systems (ILS) Librarian (#274) to oversee daily operation of the ILS. The incumbent reports to the ILS Director, participates in the planning and operations of the department, provides assistance on a wide variety of ILS-related tasks, and is expected to be intimately familiar with the MARC format. Requirements: ALA-accredited MLS typically required; minimum of 5 years of experience in working with MARC records and at least three years of experience working with the ILS. USC is an EO/AA Employer. For full position description and application procedure, see: http://www.usc.edu/libraries/jobs/librarians Best, (Mr.) Win Shih Director of Integrated Library Systems University of Southern California UVI 206B, MC 7004 Los Angeles, CA 90004 O: 213-740-9250; M: 720-936-9097 http://www.usc.edu/libraries/ ILS Request: i...@usc.edu
[CODE4LIB] Library of Congress position posting
Supervisory IT Specialist (Vacancy #: 100214) GS-2210-14 - Office of Strategic Initiatives - $105,211.00 - $136,771.00 Opening Date: Jan 11, 2011 Closing Date: Feb 2, 2011 The incumbent of this position will work in the Library of Congress Office of Strategic Initiatives. The incumbent will supervise approximately 4 to 10 information technology specialists working within one or more of the project-based sub-teams doing repository development. The incumbent will provide oversight and technical advice and counsel for the development of Web sites and applications, focusing on projects for the management, discovery and delivery of Library digital content. For more information, please visit this link for the detailed posting: http://jobview.usajobs.gov/getjob.aspx?OPMControl=2146200 -- Leslie Johnston Manager of Technical Architecture Initiatives National Digital Information Infrastructure & Preservation Program Library of Congress lesl...@loc.gov
[CODE4LIB] angel fund
After careful consideration, Patrick Force is the recipient of this year's Angel Fund For Code4Lib award. Patrick is employed at Columbia University in the Center for Digital Research and Scholarship. Solr has played a large part in his work, and he is interested in learning more about it from the Code4Lib community. He has started learning about CouchDB and wants to learn more about how it compares to standard relational models. This will be his first Code4Lib conference and he is excited about participating in our open and, in his words, "forward-thinking group of people." Patrick, welcome. Congratulations. -- Eric Morgan, Michael Giarlo, and Eric Hellman
Re: [CODE4LIB] javascript testing?
I've used Selenium with Cucumber just enough to know that I want to try it more. I've segregated my tests into non-javascript cucumber features that run fast and javascript tests that run much slower. I run the fast tests with autotest as I develop features. Everything ought to degrade nicely, so I develop these features first. Then as javascript or ajax features are added, I can manually run the javascript cucumber features which need Selenium. Not everything needs to be tested through selenium, so I do not worry so much about the speed. I haven't used this setup much yet, but so far I like the workflow. >From this page it looks like you do not need to run jruby to use culerity. Celerity runs in JRuby, but your application doesn't need to. https://github.com/langalex/culerity Jason On Tue, Jan 11, 2011 at 7:21 PM, Bess Sadler wrote: > Can anyone recommend a javascript testing framework? At Stanford, we know we > need to test the js portions of our applications, but we haven't settled on a > tool for that yet. I've heard good things about celerity > (http://celerity.rubyforge.org/) but I believe it only works with jruby, > which has been a barrier to getting started with it so far. Anyone have other > tools to suggest? Is anyone doing javascript testing in a way they like? Feel > like sharing? > > Thanks! > > Bess >
Re: [CODE4LIB] javascript testing?
Mark Redar at CDL has some selenium tests for calisphere.org/mapped but they are not automatically run I've been wanting to play around with selenium grid on EC2 but never had the time / real reason to -- but if it is as advertised it might speed up running the tests by executing them in parallel http://selenium-grid.seleniumhq.org/ http://selenium-grid.seleniumhq.org/run_the_demo_on_ec2.html -- Brian On Jan 12, 2011, at 8:45 AM, Demian Katz wrote: > For what it's worth, the VuFind community has recently been playing with > Selenium (not an especially new or exciting technology, I realize... and > probably one of the things you were thinking of for approach #1). The good > news is that it plays well with Hudson, and we have been able to get it to > successfully automatically test AJAXy code in Firefox as part of our > continuous integration process. The bad news is that it's incredibly slow -- > that successful test takes ten minutes to execute, and all it does is load > one web page and confirm that a lightbox opens when a button is clicked. I > wouldn't realistically expect this sort of thing to be FAST, but the current > performance we are experiencing stretches belief a bit -- we're still > investigating to see if we're doing something wrong that can be improved, but > the general consensus seems to be that Selenium is just really slow on > certain platforms. It's a shame, because I think we could potentially write > a very comprehensi! ve! > and powerful test suite with Selenium... but tests are significantly less > valuable if they can't give you reasonably quick feedback while you're in the > midst of coding! > > In any case, I'm happy to share my limited experience with Selenium if it's > of any use (some VuFind-specific notes are here: > http://vufind.org/wiki/unit_tests#selenium and more can probably be gleaned > by looking at VuFind's test-related configuration and scripts). I'd also be > very interested to hear if anyone has overcome the speed problems (which I've > encountered under both RedHat and Ubuntu, possibly related to using a virtual > frame buffer) or if there is a better, equivalent solution. > > - Demian > >> -Original Message- >> From: Code for Libraries [mailto:code4...@listserv.nd.edu] On Behalf Of >> Jonathan Rochkind >> Sent: Wednesday, January 12, 2011 11:32 AM >> To: CODE4LIB@LISTSERV.ND.EDU >> Subject: Re: [CODE4LIB] javascript testing? >> >> As far as I can tell, while there are several, there are none that are >> actually Just Work good. It seems to be an area still in flux, people >> coming up with an open source way to do that that is reliable and easy >> to use and just works. >> >> The main division in current approaches seems to be between: 1) Trying >> to automate _actual browsers_ so you know you've tested it in the real >> browsers you care about (the headaches of this are obvious, but people >> are doing it!), and 2) Using a headless javascript browser that can be >> run right on the server, to test general javascriptyness but without >> testing idiosyncracies of particular browsers (I would lean towards >> this >> one myself, I'm willing to give up what it gives up for something that >> works a lot simpler with less headaches). >> >> Jonathan >> >> On 1/11/2011 7:21 PM, Bess Sadler wrote: >>> Can anyone recommend a javascript testing framework? At Stanford, we >> know we need to test the js portions of our applications, but we >> haven't settled on a tool for that yet. I've heard good things about >> celerity (http://celerity.rubyforge.org/) but I believe it only works >> with jruby, which has been a barrier to getting started with it so far. >> Anyone have other tools to suggest? Is anyone doing javascript testing >> in a way they like? Feel like sharing? >>> >>> Thanks! >>> >>> Bess >>>
Re: [CODE4LIB] javascript testing?
I have the MyEclipse debugger, but in practice, I don't use it often. I have used a variety of Javascript dev platforms over the years, starting with one that was bundled with ColdFusion Studio/Homesite, and have found that they seem to take more time and effort than they save. I do use Firebug in Firefox, which is easy and effective. I have the Javascript Debugger (nee Venkman) for Firefox, as well, but don't use that much either. I am not sure what the Javascript capabilities of Firebug Lite bookmarklet are in other browsers. Thanks, Cary On Tue, Jan 11, 2011 at 4:21 PM, Bess Sadler wrote: > Can anyone recommend a javascript testing framework? At Stanford, we know we > need to test the js portions of our applications, but we haven't settled on a > tool for that yet. I've heard good things about celerity > (http://celerity.rubyforge.org/) but I believe it only works with jruby, > which has been a barrier to getting started with it so far. Anyone have other > tools to suggest? Is anyone doing javascript testing in a way they like? Feel > like sharing? > > Thanks! > > Bess > -- Cary Gordon The Cherry Hill Company http://chillco.com
Re: [CODE4LIB] javascript testing?
For what it's worth, the VuFind community has recently been playing with Selenium (not an especially new or exciting technology, I realize... and probably one of the things you were thinking of for approach #1). The good news is that it plays well with Hudson, and we have been able to get it to successfully automatically test AJAXy code in Firefox as part of our continuous integration process. The bad news is that it's incredibly slow -- that successful test takes ten minutes to execute, and all it does is load one web page and confirm that a lightbox opens when a button is clicked. I wouldn't realistically expect this sort of thing to be FAST, but the current performance we are experiencing stretches belief a bit -- we're still investigating to see if we're doing something wrong that can be improved, but the general consensus seems to be that Selenium is just really slow on certain platforms. It's a shame, because I think we could potentially write a very comprehensive! and powerful test suite with Selenium... but tests are significantly less valuable if they can't give you reasonably quick feedback while you're in the midst of coding! In any case, I'm happy to share my limited experience with Selenium if it's of any use (some VuFind-specific notes are here: http://vufind.org/wiki/unit_tests#selenium and more can probably be gleaned by looking at VuFind's test-related configuration and scripts). I'd also be very interested to hear if anyone has overcome the speed problems (which I've encountered under both RedHat and Ubuntu, possibly related to using a virtual frame buffer) or if there is a better, equivalent solution. - Demian > -Original Message- > From: Code for Libraries [mailto:code4...@listserv.nd.edu] On Behalf Of > Jonathan Rochkind > Sent: Wednesday, January 12, 2011 11:32 AM > To: CODE4LIB@LISTSERV.ND.EDU > Subject: Re: [CODE4LIB] javascript testing? > > As far as I can tell, while there are several, there are none that are > actually Just Work good. It seems to be an area still in flux, people > coming up with an open source way to do that that is reliable and easy > to use and just works. > > The main division in current approaches seems to be between: 1) Trying > to automate _actual browsers_ so you know you've tested it in the real > browsers you care about (the headaches of this are obvious, but people > are doing it!), and 2) Using a headless javascript browser that can be > run right on the server, to test general javascriptyness but without > testing idiosyncracies of particular browsers (I would lean towards > this > one myself, I'm willing to give up what it gives up for something that > works a lot simpler with less headaches). > > Jonathan > > On 1/11/2011 7:21 PM, Bess Sadler wrote: > > Can anyone recommend a javascript testing framework? At Stanford, we > know we need to test the js portions of our applications, but we > haven't settled on a tool for that yet. I've heard good things about > celerity (http://celerity.rubyforge.org/) but I believe it only works > with jruby, which has been a barrier to getting started with it so far. > Anyone have other tools to suggest? Is anyone doing javascript testing > in a way they like? Feel like sharing? > > > > Thanks! > > > > Bess > >
Re: [CODE4LIB] data export help: line breaks on tab-delimited download
This is good to know -- the data is likely to be used chiefly in Windows contexts, so the \r\n option might make most sense. Appreciate everyone's help on this! joys Ken -Original Message- From: Jonathan Rochkind [mailto:rochk...@jhu.edu] Sent: Wednesday, January 12, 2011 11:34 AM To: Code for Libraries Cc: Ken Irwin Subject: Re: [CODE4LIB] data export help: line breaks on tab-delimited download Windows NotePad probably needs an \r\n combo at the end of every line, windows style. Whether you should worry about that depends on where the file is destined for and if it matters. (Becuase an \r\n at the end of every line might (or might not) mess up some unix or mac applications. Ah, line endings.) On 1/11/2011 7:57 PM, Ken Irwin wrote: > Jonathan's questions were right on target. I was opening the files in the > standard MS Notepad editor, and it was not observing line breaks. When I went > to go open the files in MiniTab they were just fine. (Changing the files to > .txt and text/plain did *not* fix the problem in Notepad, and I do wonder > what it would take to make that program happy, but in this case it doesn't > much matter.) > > Thanks for the help > Ken > > -Original Message- > From: Code for Libraries [mailto:code4...@listserv.nd.edu] On Behalf Of > Jonathan Rochkind > Sent: Tuesday, January 11, 2011 3:41 PM > To: CODE4LIB@LISTSERV.ND.EDU > Subject: Re: [CODE4LIB] data export help: line breaks on tab-delimited > download > > line breaks don't appear when you view it with what software? > > Can you have your browser save it to disk after it prompts you to do so, > and open with a reliable text editor you know how to use and confirm if > \n is really still in the file or not? > > If you are viewing it in your web brower, then your web browser is > probably deciding to display it as HTML. The line breaks are probably > still there, the web browser is just displaying as HTML. Web browsers > aren't great places to view text. If you are viewing it after saving it > to disk, then your web browser probably won't know to display as text > unless the filename ends in ".txt". If you are viewing it without > saving to disk (but then why are you using > Content-Disposition:attachment?), then make sure you're still setting > the content-type appropriately; and you may need to make the filename > end in .txt anyway. > > The line breaks are probably still there, your web browser is just > rendering the file as html rather than txt, is my guess. > > On 1/11/2011 3:29 PM, Ken Irwin wrote: >> Hi all, >> >> I've got a dataset that I'm trying to make exportable for MiniTab, etc. It's >> tab-delimited and lines end with "\n". >> >> When I serve it up as "text/plain" and view it in my web browser, it works >> just fine and all the line breaks are in the right places. >> >> When I send the header to make it a downloadable "attachment": >> Content-Disposition: attachment; filename="categories.tab" >> Then there are no line breaks at all - it's all one line, and the >> line-breaks don't appear. >> >> I tried "\r" instead, and that didn't work either. >> >> Any idea what I might be doing wrong here? >> >> Thanks >> Ken >>
Re: [CODE4LIB] javascript testing?
As far as I can tell, while there are several, there are none that are actually Just Work good. It seems to be an area still in flux, people coming up with an open source way to do that that is reliable and easy to use and just works. The main division in current approaches seems to be between: 1) Trying to automate _actual browsers_ so you know you've tested it in the real browsers you care about (the headaches of this are obvious, but people are doing it!), and 2) Using a headless javascript browser that can be run right on the server, to test general javascriptyness but without testing idiosyncracies of particular browsers (I would lean towards this one myself, I'm willing to give up what it gives up for something that works a lot simpler with less headaches). Jonathan On 1/11/2011 7:21 PM, Bess Sadler wrote: Can anyone recommend a javascript testing framework? At Stanford, we know we need to test the js portions of our applications, but we haven't settled on a tool for that yet. I've heard good things about celerity (http://celerity.rubyforge.org/) but I believe it only works with jruby, which has been a barrier to getting started with it so far. Anyone have other tools to suggest? Is anyone doing javascript testing in a way they like? Feel like sharing? Thanks! Bess
Re: [CODE4LIB] data export help: line breaks on tab-delimited download
Ugh, that third step is ugly to require the user to do that. Will it work okay in MS Access if you skip that part, will Access be okay with just \n? If not, I might actually try sniffing the OS from the user-agent and converting line-endings to appropriate for that OS before delivering the file; making people do that extra step would make me sad. On 1/12/2011 10:34 AM, Doran, Michael D wrote: For future reference, Notepad will only recognize "\r\n", not "\r" or "\n" alone. Also, use Wordpad or Notepad++ instead. That's been my experience, too. These are my instructions to staff for downloading a delimited text file from one of our (Unix) web servers to their PC: 1) Right-click and select "Save Target (or Link) As..." 2) Save the file in desired directory 3) Once the file is saved, open it in WordPad and re-save 4) Optional: import the file into MS Access After step 3, they can also view it okay in Notepad. Opening and re-saving the file in WordPad apparently converts the Unix line-endings to the Windows line-endings. -- Michael -Original Message- From: Code for Libraries [mailto:code4...@listserv.nd.edu] On Behalf Of Gabriel Farrell Sent: Wednesday, January 12, 2011 12:09 AM To: CODE4LIB@LISTSERV.ND.EDU Subject: Re: [CODE4LIB] data export help: line breaks on tab-delimited download For future reference, Notepad will only recognize "\r\n", not "\r" or "\n" alone. Also, use Wordpad or Notepad++ instead. Further reading: http://social.msdn.microsoft.com/forums/en-US/vclanguage/thread/cba503b1-a0e2- 4a64-a970-f735c5bc1c90 http://www.baanboard.com/baanboard/showthread.php?t=9069 On Tue, Jan 11, 2011 at 7:57 PM, Ken Irwin wrote: Jonathan's questions were right on target. I was opening the files in the standard MS Notepad editor, and it was not observing line breaks. When I went to go open the files in MiniTab they were just fine. (Changing the files to .txt and text/plain did *not* fix the problem in Notepad, and I do wonder what it would take to make that program happy, but in this case it doesn't much matter.) Thanks for the help Ken -Original Message- From: Code for Libraries [mailto:code4...@listserv.nd.edu] On Behalf Of Jonathan Rochkind Sent: Tuesday, January 11, 2011 3:41 PM To: CODE4LIB@LISTSERV.ND.EDU Subject: Re: [CODE4LIB] data export help: line breaks on tab-delimited download line breaks don't appear when you view it with what software? Can you have your browser save it to disk after it prompts you to do so, and open with a reliable text editor you know how to use and confirm if \n is really still in the file or not? If you are viewing it in your web brower, then your web browser is probably deciding to display it as HTML. The line breaks are probably still there, the web browser is just displaying as HTML. Web browsers aren't great places to view text. If you are viewing it after saving it to disk, then your web browser probably won't know to display as text unless the filename ends in ".txt". If you are viewing it without saving to disk (but then why are you using Content-Disposition:attachment?), then make sure you're still setting the content-type appropriately; and you may need to make the filename end in .txt anyway. The line breaks are probably still there, your web browser is just rendering the file as html rather than txt, is my guess. On 1/11/2011 3:29 PM, Ken Irwin wrote: Hi all, I've got a dataset that I'm trying to make exportable for MiniTab, etc. It's tab-delimited and lines end with "\n". When I serve it up as "text/plain" and view it in my web browser, it works just fine and all the line breaks are in the right places. When I send the header to make it a downloadable "attachment": Content-Disposition: attachment; filename="categories.tab" Then there are no line breaks at all - it's all one line, and the line- breaks don't appear. I tried "\r" instead, and that didn't work either. Any idea what I might be doing wrong here? Thanks Ken
Re: [CODE4LIB] data export help: line breaks on tab-delimited download
Windows NotePad probably needs an \r\n combo at the end of every line, windows style. Whether you should worry about that depends on where the file is destined for and if it matters. (Becuase an \r\n at the end of every line might (or might not) mess up some unix or mac applications. Ah, line endings.) On 1/11/2011 7:57 PM, Ken Irwin wrote: Jonathan's questions were right on target. I was opening the files in the standard MS Notepad editor, and it was not observing line breaks. When I went to go open the files in MiniTab they were just fine. (Changing the files to .txt and text/plain did *not* fix the problem in Notepad, and I do wonder what it would take to make that program happy, but in this case it doesn't much matter.) Thanks for the help Ken -Original Message- From: Code for Libraries [mailto:code4...@listserv.nd.edu] On Behalf Of Jonathan Rochkind Sent: Tuesday, January 11, 2011 3:41 PM To: CODE4LIB@LISTSERV.ND.EDU Subject: Re: [CODE4LIB] data export help: line breaks on tab-delimited download line breaks don't appear when you view it with what software? Can you have your browser save it to disk after it prompts you to do so, and open with a reliable text editor you know how to use and confirm if \n is really still in the file or not? If you are viewing it in your web brower, then your web browser is probably deciding to display it as HTML. The line breaks are probably still there, the web browser is just displaying as HTML. Web browsers aren't great places to view text. If you are viewing it after saving it to disk, then your web browser probably won't know to display as text unless the filename ends in ".txt". If you are viewing it without saving to disk (but then why are you using Content-Disposition:attachment?), then make sure you're still setting the content-type appropriately; and you may need to make the filename end in .txt anyway. The line breaks are probably still there, your web browser is just rendering the file as html rather than txt, is my guess. On 1/11/2011 3:29 PM, Ken Irwin wrote: Hi all, I've got a dataset that I'm trying to make exportable for MiniTab, etc. It's tab-delimited and lines end with "\n". When I serve it up as "text/plain" and view it in my web browser, it works just fine and all the line breaks are in the right places. When I send the header to make it a downloadable "attachment": Content-Disposition: attachment; filename="categories.tab" Then there are no line breaks at all - it's all one line, and the line-breaks don't appear. I tried "\r" instead, and that didn't work either. Any idea what I might be doing wrong here? Thanks Ken
Re: [CODE4LIB] data export help: line breaks on tab-delimited download
> For future reference, Notepad will only recognize "\r\n", not "\r" or > "\n" alone. Also, use Wordpad or Notepad++ instead. That's been my experience, too. These are my instructions to staff for downloading a delimited text file from one of our (Unix) web servers to their PC: 1) Right-click and select "Save Target (or Link) As..." 2) Save the file in desired directory 3) Once the file is saved, open it in WordPad and re-save 4) Optional: import the file into MS Access After step 3, they can also view it okay in Notepad. Opening and re-saving the file in WordPad apparently converts the Unix line-endings to the Windows line-endings. -- Michael > -Original Message- > From: Code for Libraries [mailto:code4...@listserv.nd.edu] On Behalf Of > Gabriel Farrell > Sent: Wednesday, January 12, 2011 12:09 AM > To: CODE4LIB@LISTSERV.ND.EDU > Subject: Re: [CODE4LIB] data export help: line breaks on tab-delimited > download > > For future reference, Notepad will only recognize "\r\n", not "\r" or > "\n" alone. Also, use Wordpad or Notepad++ instead. > > Further reading: > http://social.msdn.microsoft.com/forums/en-US/vclanguage/thread/cba503b1-a0e2- > 4a64-a970-f735c5bc1c90 > http://www.baanboard.com/baanboard/showthread.php?t=9069 > > On Tue, Jan 11, 2011 at 7:57 PM, Ken Irwin wrote: > > Jonathan's questions were right on target. I was opening the files in the > standard MS Notepad editor, and it was not observing line breaks. When I went > to go open the files in MiniTab they were just fine. (Changing the files to > .txt and text/plain did *not* fix the problem in Notepad, and I do wonder what > it would take to make that program happy, but in this case it doesn't much > matter.) > > > > Thanks for the help > > Ken > > > > -Original Message- > > From: Code for Libraries [mailto:code4...@listserv.nd.edu] On Behalf Of > Jonathan Rochkind > > Sent: Tuesday, January 11, 2011 3:41 PM > > To: CODE4LIB@LISTSERV.ND.EDU > > Subject: Re: [CODE4LIB] data export help: line breaks on tab-delimited > download > > > > line breaks don't appear when you view it with what software? > > > > Can you have your browser save it to disk after it prompts you to do so, > > and open with a reliable text editor you know how to use and confirm if > > \n is really still in the file or not? > > > > If you are viewing it in your web brower, then your web browser is > > probably deciding to display it as HTML. The line breaks are probably > > still there, the web browser is just displaying as HTML. Web browsers > > aren't great places to view text. If you are viewing it after saving it > > to disk, then your web browser probably won't know to display as text > > unless the filename ends in ".txt". If you are viewing it without > > saving to disk (but then why are you using > > Content-Disposition:attachment?), then make sure you're still setting > > the content-type appropriately; and you may need to make the filename > > end in .txt anyway. > > > > The line breaks are probably still there, your web browser is just > > rendering the file as html rather than txt, is my guess. > > > > On 1/11/2011 3:29 PM, Ken Irwin wrote: > >> Hi all, > >> > >> I've got a dataset that I'm trying to make exportable for MiniTab, etc. > It's tab-delimited and lines end with "\n". > >> > >> When I serve it up as "text/plain" and view it in my web browser, it works > just fine and all the line breaks are in the right places. > >> > >> When I send the header to make it a downloadable "attachment": > >> Content-Disposition: attachment; filename="categories.tab" > >> Then there are no line breaks at all - it's all one line, and the line- > breaks don't appear. > >> > >> I tried "\r" instead, and that didn't work either. > >> > >> Any idea what I might be doing wrong here? > >> > >> Thanks > >> Ken > >> > >