Forum OpenACS Q&A: brief acceptance test for 3.2.5

Collapse
Posted by Rafael Calvo on
I still don't have openacs working due to the problems you can see in this other thread. But I wanted to document the errors I was getting and the info I got from the forums.
I think it looks like a primitive draft of an acceptance-test for openacs-3.2.5. It is in very porr shape but when I get the things working it should be more complete, and maybe usable by others. Meanwhile it can give info to whoever wants to helpme.
cheers
Collapse
Posted by Jonathan Marsden on
An Acceptance Test for OpenACS is definitely a Good Thing (TM)!

Thanks for taking this on, I hope you'll be able to really develop a good set of acceptance tests for OpenACS. Automating them as much as possible would also be very helpful. As a general principle, I would suggest trying to find alternate tests for each test that seems to fail, rather than just saying "it is OK for test X to fail". Ideas follow:

to_date() returns '0002-12-29 BC': I think this is an artifact of the supplied date '1-1-2000' NOT being in the format of DD-MM-YYYY but having single digit D and M fields. The query

select to_date('01-01-2000', 'MM-DD-YYYY') as y2k from dual ;

yields the expected answer (under PG 7.1 at least). So this may actually be the aD acceptance test testing something slightly different from what will actually be needed within the system. The OpenACS to_date() could probably be fixed to handle this case, but someone with more knowledge of the guts of OpenACS than me will need to decide whether it would actually help anything other than just this one (artificial) test or not.

user_tables missing: The equivalent (near as I can tell) in OpenACS would be

select distinct table_name from user_tab_columns where lower(table_name) in ('country_codes', 'states', 'counties') ;

Registration and User Administration: I think much of what you are saying needs testing here is effectively tested if you follow the instructions in the OpenACS Installation Guide about creating a user for yourself and making that user an admin, and changing the system user password. This is in Section 6.4, and running the acceptance tests is in 6.7.

This is not necesrily a bad thing. However, it also means that by the time you run the Acceptance Tests, the password of the 'system' user should not be 'changeme', because you would have changed it back in Section 6.4.

I hope these ideas help you improve your document further!

Collapse
Posted by Rafael Calvo on
Thanks Jonathan,
Today I am not sure if I am up to it... maybe is redhat7.0 but I am still trying to get it running.

I will add your comments to the document

Collapse
Posted by Pavel Boghita on
I know that this an old thread and that I may be behind times, but maybe someone is reading this.
I have gone through the first tests successfully, but I couldn't work out the nearest equivalent to "select im_convert('foo bar') from dual ;". Could anyone explain me how should this be put in PostgreSQL terms ?
Collapse
Posted by Roberto Mello on
What does "select im_convert('foo bar') from dual ;" do?
Collapse
Posted by Pavel Boghita on
Roberto, I have no idea what this does hence the question. I guess is some sort of Oracle type query. I took it from the acceptance test. I just wanted to know how to apply a similar test to my OpenAcs PostgreSQL installation

#############

If you installed site-wide-search make sure the im_convert PL/SQL proc is there. This procedure converts a search string into a form interMedia understands to perform the search.

SQL> select im_convert('foo bar') from dual ;

IM_CONVERT('FOOBAR')
--------------------------------------------------------------------------------
( { foo } NEAR { bar })*2.0,about( foo bar )

If this is not what you see, then you likely failed to properly feed Oracle the data model.

#########################

That's all, thanks.
Collapse
Posted by Michael Bryzek on
The im_convert function originated within the Oracle interMedia group (now called Oracle Text). interMedia's query language is not something we should expect end users to learn. interMedia's response was to use this function to translate a human entered query into a string that interMedia could understand.

If you're interested in understanding what each of the operators does a good start is http://www.arsdigita.com/asj/intermedia/intermedia.html

Greenspun has a paragraph about im_convert at http://philip.greenspun.com/internet-application-workbook/examples-search/site-wide-search