semanticscuttle-devel Mailing List for SemanticScuttle (Page 4)
Brought to you by:
cweiske
You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
(1) |
Oct
(5) |
Nov
(4) |
Dec
(2) |
2010 |
Jan
(9) |
Feb
(4) |
Mar
(1) |
Apr
|
May
|
Jun
(2) |
Jul
(1) |
Aug
(1) |
Sep
(6) |
Oct
|
Nov
|
Dec
|
2011 |
Jan
(20) |
Feb
(47) |
Mar
(25) |
Apr
(19) |
May
(58) |
Jun
(14) |
Jul
(5) |
Aug
(4) |
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Christian W. <cw...@cw...> - 2011-05-07 07:34:48
|
Hello Mark, > > - 1) BookmarkTest::testPrivateBookmarks > > Undefined offset: 1 > > /home/cweiske/Dev/semanticscuttle/cwdev/tests/BookmarkTest.php:1387 > Updated - just changed it to look at the size of the array versus an > actual array element. You did it the wrong way: > $this->assertEquals(count($bookmarks['bookmarks']),1); In PHPUnit, you always specify the expected value first and the actual value second. All assertion methods allow another optional parameter, the additional error message to make errors clearer. So instead of > $this->assertEquals(234, $obj->some->property) you can write > $this->assertEquals(234, $obj->some->property, 'property should > always be 234 - it is specified that way') PHPUnit then will print out your error message plus the "normal" "failed to assert that 434 equals 234". I use this for complicated assertions that need an explanation. In your case, this is not needed. -- Regards/Mit freundlichen Grüßen Christian Weiske -=≡ Geeking around in the name of science since 1982 ≡=- |
From: Christian W. <cw...@cw...> - 2011-05-07 07:14:08
|
Hello Mark, > > - Does not work with all bookmarks (plain rss.php?privatekey) - I'm > > likely to subscribe to the all bookmarks feed in a private SC > > setup with a several users. > Sorry for being a little slow, but I need a little clarification on > this. I was using the passed username as well as the privatekey for > authentication. So if the request is to simply have the plain > rss.php?privatekey=123 url, then I'll need to alter the > authentication function. Additionally, what would the plain url show > that would be different than the full url > (rss.php/mpemberton?privatekey=123)? rss.php/$username returns the user's bookmarks, while rss.php without username returns bookmarks of all users - adding the privatekey would also list new bookmarks that got shared with the current user (watchlist+shared bookmark), and his private ones. Getting bookmarks that are shared with me is important. For authentication, the private key should be enough, since it's unique within the database. > > - Generating new key throws away form changes. This isn't that nice, > > but I'll accept it for now and we can fix that when the quickform > > branch is finished. > We still good at waiting on this when the Quickform branch is done? Yep. > > - 1) BookmarkTest::testPrivateBookmarks > > Undefined offset: 1 > > /home/cweiske/Dev/semanticscuttle/cwdev/tests/BookmarkTest.php:1387 > Updated - just changed it to look at the size of the array versus an > actual array element. That's fine. -- Regards/Mit freundlichen Grüßen Christian Weiske -=≡ Geeking around in the name of science since 1982 ≡=- |
From: Mark P. <mpe...@gm...> - 2011-05-07 05:33:40
|
> - Does not work with all bookmarks (plain rss.php?privatekey) - I'm > likely to subscribe to the all bookmarks feed in a private SC setup > with a several users. Sorry for being a little slow, but I need a little clarification on this. I was using the passed username as well as the privatekey for authentication. So if the request is to simply have the plain rss.php?privatekey=123 url, then I'll need to alter the authentication function. Additionally, what would the plain url show that would be different than the full url (rss.php/mpemberton?privatekey=123)? > - Generating new key throws away form changes. This isn't that nice, > but I'll accept it for now and we can fix that when the quickform > branch is finished. We still good at waiting on this when the Quickform branch is done? > - 1) BookmarkTest::testPrivateBookmarks > Undefined offset: 1 > /home/cweiske/Dev/semanticscuttle/cwdev/tests/BookmarkTest.php:1387 Updated - just changed it to look at the size of the array versus an actual array element. Cheers, Mark On Fri, Apr 29, 2011 at 12:55 AM, Christian Weiske <cw...@cw...>wrote: > Hello Mark, > > > > > And just a heads-up, I tried to test everything regarding the > > > special characters with the titles, etc. If you find something > > > that is not right, let me know. > > > > + Privatekey works fine for the user's own bookmarks > > - Does not work with all bookmarks (plain rss.php?privatekey) - I'm > > likely to subscribe to the all bookmarks feed in a private SC setup > > with a several users. > > + Enabling and disabling the private key works fine > > + Error page when accessing feed with wrong private key > > + Error page when accessing feed with disabled private key > > - Generating new key throws away form changes. This isn't that nice, > > but I'll accept it for now and we can fix that when the quickform > > branch is finished. > > - 1) BookmarkTest::testPrivateBookmarks > > Undefined offset: 1 > > /home/cweiske/Dev/semanticscuttle/cwdev/tests/BookmarkTest.php:1387 > > What's the status of the open missing items? > > -- > Regards/Mit freundlichen Grüßen > Christian Weiske > > -=≡ Geeking around in the name of science since 1982 ≡=- > > > ------------------------------------------------------------------------------ > WhatsUp Gold - Download Free Network Management Software > The most intuitive, comprehensive, and cost-effective network > management toolset available today. Delivers lowest initial > acquisition cost and overall TCO of any competing solution. > http://p.sf.net/sfu/whatsupgold-sd > _______________________________________________ > Semanticscuttle-devel mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semanticscuttle-devel > > |
From: Christian W. <cw...@cw...> - 2011-05-05 14:35:42
|
Hi all, We've got a working SemanticScuttle demo installation on our sourceforge project homepage now: > http://semanticscuttle.sourceforge.net/demo/ -- Regards/Mit freundlichen Grüßen Christian Weiske -=≡ Geeking around in the name of science since 1982 ≡=- |
From: Christian W. <cw...@cw...> - 2011-05-04 17:48:39
|
Hi, I started working on SSL client certificate support today, and you get already automatically logged in when your client cert ist registered in the sc_users_sslclientcerts table. Currently you need to manually do that because the interface to assign them is yet to be written :) I'm using the following SSL virtual host settings in the apache configuration: SSLEngine On SSLCertificateFile /etc/ssl/private/bm.bogo.cweiske.de-cacert.pem SSLCertificateKeyFile /etc/ssl/private/bm.bogo.cweiske.de.key SSLCACertificateFile /etc/ssl/private/cacert-1and3.crt #enable client certificate login SSLOptions +StdEnvVars SSLVerifyClient optional SSLVerifyDepth 1 I used the CAcert CSR generator[1] to generate the key and the csr file, used the .csr to apply for the certificate @cacert and saved the certificate I got from them as the .pem. Then I put both their public class1 (root) and class3 certificates into the cacert-1and3.crt file and restarted apache. The option "SSLVerifyClient optional" tells apache to ask for a client certificate but not to require it, so that users can login normally if they wish. If a registered client certificate is provided by the browser, the user get automatically logged in. Branch is ssl-client-certs; I hope to get it into 0.98.0. [1] http://wiki.cacert.org/CSRGenerator -- Regards/Mit freundlichen Grüßen Christian Weiske -=≡ Geeking around in the name of science since 1982 ≡=- |
From: Christian W. <cw...@cw...> - 2011-05-04 06:13:07
|
Hello Mark, > > Brett and Mark, can you finish you tasks until end of the week? I added a new "sc_schema" table that contains the current database schema version, so we can determine the current schema version in the future and upgrade it automatically. Whenever the database is changed, add your changes in a new file in data/schema/$newversion.sql. In that file, also upgrade the schema version. You need to merge master now and put your privatekey sql changes into the schema files (tables.sql, schema/6.sql, doc/UPGRADE.txt). -- Regards/Mit freundlichen Grüßen Christian Weiske -=≡ Geeking around in the name of science since 1982 ≡=- |
From: Brett D. <bs...@fr...> - 2011-05-04 03:18:52
|
I can finish by the end of the week. Rgrds, Brett On Tue, 3 May 2011 19:23:52 -0400, Mark Pemberton <mpe...@gm...> wrote: > Yes. > > On Tue, May 3, 2011 at 4:11 PM, Christian Weiske wrote: > Hi all, > > The release of SemanticScuttle 0.98.0 is near. All what's stopping > me > from publishing the release is the configurable-privacy2 and > privatekey > branches which need some minor fixes and will be merged then. > > Brett and Mark, can you finish you tasks until end of the week? > > -- > Regards/Mit freundlichen Grüßen > Christian Weiske > > -=≡ Geeking around in the name of science since 1982 ≡=- > > ------------------------------------------------------------------------------ > WhatsUp Gold - Download Free Network Management Software > The most intuitive, comprehensive, and cost-effective network > management toolset available today. Delivers lowest initial > acquisition cost and overall TCO of any competing solution. > http://p.sf.net/sfu/whatsupgold-sd [2] > _______________________________________________ > Semanticscuttle-devel mailing list > Sem...@li... [3] > https://lists.sourceforge.net/lists/listinfo/semanticscuttle-devel > [4] > > > > Links: > ------ > [1] mailto:cw...@cw... > [2] http://p.sf.net/sfu/whatsupgold-sd > [3] mailto:Sem...@li... > [4] > https://lists.sourceforge.net/lists/listinfo/semanticscuttle-devel |
From: Mark P. <mpe...@gm...> - 2011-05-03 23:24:01
|
Yes. On Tue, May 3, 2011 at 4:11 PM, Christian Weiske <cw...@cw...> wrote: > Hi all, > > > The release of SemanticScuttle 0.98.0 is near. All what's stopping me > from publishing the release is the configurable-privacy2 and privatekey > branches which need some minor fixes and will be merged then. > > Brett and Mark, can you finish you tasks until end of the week? > > -- > Regards/Mit freundlichen Grüßen > Christian Weiske > > -=≡ Geeking around in the name of science since 1982 ≡=- > > > ------------------------------------------------------------------------------ > WhatsUp Gold - Download Free Network Management Software > The most intuitive, comprehensive, and cost-effective network > management toolset available today. Delivers lowest initial > acquisition cost and overall TCO of any competing solution. > http://p.sf.net/sfu/whatsupgold-sd > _______________________________________________ > Semanticscuttle-devel mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semanticscuttle-devel > > |
From: Christian W. <cw...@cw...> - 2011-05-03 20:12:01
|
Hi all, The release of SemanticScuttle 0.98.0 is near. All what's stopping me from publishing the release is the configurable-privacy2 and privatekey branches which need some minor fixes and will be merged then. Brett and Mark, can you finish you tasks until end of the week? -- Regards/Mit freundlichen Grüßen Christian Weiske -=≡ Geeking around in the name of science since 1982 ≡=- |
From: Christian W. <cw...@cw...> - 2011-05-03 05:16:02
|
Hello Brett, > I'll have a look at the unit tests this week. If I'm not able to clean > them up any more, I can at least learn from the changes you've made. I actually finished cleaning them up yesterday. What's left is moving most of them from PostsAddTest.php to files that match the URL that is tested. > I am apprehensive about doing a merge myself since I am still > relatively new to git. And I merged master yesterday, too - it wasn't as hard as I thought; only 6 files that had merge conflicts. -- Regards/Mit freundlichen Grüßen Christian Weiske -=≡ Geeking around in the name of science since 1982 ≡=- |
From: Brett D. <bs...@fr...> - 2011-05-02 22:12:27
|
Hello, Christian. I'll have a look at the unit tests this week. If I'm not able to clean them up any more, I can at least learn from the changes you've made. I am apprehensive about doing a merge myself since I am still relatively new to git. However, I will need to learn this at some point and will be installing msysgit soon. Rgrds, Brett On Fri, 29 Apr 2011 06:59:36 +0200, Christian Weiske <cw...@cw...> wrote: > Hello Brett, > > > You have probably noticed that I'm reworking some of your tests to be > smaller and more independent, and replacing some of the test code with > more abstract methods. > > For example, you created a cookie yourself and relied on the knowledge > how it is created internally. That is replaced with generic login > method that does everything for you and gives you a http request full > with all cookies needed. There were one or two bugs in that method > which is why you probably didn't use it in the first place. > > Only some of this things to fix are left, then we can merge master into > your branch and - when all is fine - merge your branch into master. > > I wrote some blog articles and had vacation last week which is why > nothing happened on my side, but I'll probably get the last of your > tests sorted out until next wednesday. > > Brett, I'd be happy if you could continue making the tests nicer and > merge master - but merging is not trivial if you don't have a good > graphical mergetool or really know what you do. I can do that without > problems. |
From: Christian W. <cw...@cw...> - 2011-04-29 04:59:46
|
Hello Brett, You have probably noticed that I'm reworking some of your tests to be smaller and more independent, and replacing some of the test code with more abstract methods. For example, you created a cookie yourself and relied on the knowledge how it is created internally. That is replaced with generic login method that does everything for you and gives you a http request full with all cookies needed. There were one or two bugs in that method which is why you probably didn't use it in the first place. Only some of this things to fix are left, then we can merge master into your branch and - when all is fine - merge your branch into master. I wrote some blog articles and had vacation last week which is why nothing happened on my side, but I'll probably get the last of your tests sorted out until next wednesday. Brett, I'd be happy if you could continue making the tests nicer and merge master - but merging is not trivial if you don't have a good graphical mergetool or really know what you do. I can do that without problems. -- Regards/Mit freundlichen Grüßen Christian Weiske -=≡ Geeking around in the name of science since 1982 ≡=- |
From: Christian W. <cw...@cw...> - 2011-04-29 04:55:49
|
Hello Mark, > > And just a heads-up, I tried to test everything regarding the > > special characters with the titles, etc. If you find something > > that is not right, let me know. > > + Privatekey works fine for the user's own bookmarks > - Does not work with all bookmarks (plain rss.php?privatekey) - I'm > likely to subscribe to the all bookmarks feed in a private SC setup > with a several users. > + Enabling and disabling the private key works fine > + Error page when accessing feed with wrong private key > + Error page when accessing feed with disabled private key > - Generating new key throws away form changes. This isn't that nice, > but I'll accept it for now and we can fix that when the quickform > branch is finished. > - 1) BookmarkTest::testPrivateBookmarks > Undefined offset: 1 > /home/cweiske/Dev/semanticscuttle/cwdev/tests/BookmarkTest.php:1387 What's the status of the open missing items? -- Regards/Mit freundlichen Grüßen Christian Weiske -=≡ Geeking around in the name of science since 1982 ≡=- |
From: Christian W. <cw...@cw...> - 2011-04-15 04:31:39
|
Hello Brett, > I've got the relevant tests running for PostsAddTest.php but had > another question: > > The remaining tests make HTTP requests to files that aren't part of > the api (viz., edit.php, importNetscape.php, import.php, and > bookmarks.php). Should I create new test files for these under > tests/Api? It seems like they should go somewhere else. I'm writing some tests for the open search description and have some test for www/search.php - and put it under tests/www/searchTest.php I guess the will be reorganized a bit after we finished 0.98. -- Regards/Mit freundlichen Grüßen Christian Weiske -=≡ Geeking around in the name of science since 1982 ≡=- |
From: Brett D. <bs...@fr...> - 2011-04-15 02:11:21
|
Hello, Christian. I've got the relevant tests running for PostsAddTest.php but had another question: The remaining tests make HTTP requests to files that aren't part of the api (viz., edit.php, importNetscape.php, import.php, and bookmarks.php). Should I create new test files for these under tests/Api? It seems like they should go somewhere else. Maybe not a big issue, but worth asking. Rgrds, Brett On Thu, 14 Apr 2011 19:46:22 +0200, Christian Weiske <cw...@cw...> wrote: > Hello Brett, > > > >> I'm having trouble with a few items in PostsAddTest.php. I tried to >> run this test in PHPUnit and kept getting 404 responses from the Web >> server. Then I noticed line 36: >> >> protected $urlPart = 'api/posts/add'; >> >> I thought maybe this should be 'api/posts_add' and changed it. That >> eliminated the 404s, and so I thought it might be a mistake > I'll check that - we have URL rewriting rules that may affect that. > >>, but I was >> also unable to get the tests to run without explicitly specifying >> $urlSuffix because it was not getting set in TestBaseApi.php. > You need to set $urlPart in each test class to the URL file you're > about to test. Then $urlSuffix is only necessary for i.e. URL > parameters like "?id=foo" or such. > > >> I assume that I'm missing a bunch of setup tasks because these tests >> should not be able to pass as I first attempted to run them in >> PHPUnit. Or maybe I should be running the tests all at once? > No, every test should be runnable standalone and may never depend on > data set/generated by previous tests. > > This has several reasons: > - Tests just may be run alone by i.e. > > phpunit --filter $nameoftestmethod . > - You could activate process isolation in phpunit which means every > test is run in an different php instance. |
From: Christian W. <cw...@cw...> - 2011-04-14 17:46:34
|
Hello Brett, > I'm having trouble with a few items in PostsAddTest.php. I tried to > run this test in PHPUnit and kept getting 404 responses from the Web > server. Then I noticed line 36: > > protected $urlPart = 'api/posts/add'; > > I thought maybe this should be 'api/posts_add' and changed it. That > eliminated the 404s, and so I thought it might be a mistake I'll check that - we have URL rewriting rules that may affect that. >, but I was > also unable to get the tests to run without explicitly specifying > $urlSuffix because it was not getting set in TestBaseApi.php. You need to set $urlPart in each test class to the URL file you're about to test. Then $urlSuffix is only necessary for i.e. URL parameters like "?id=foo" or such. > I assume that I'm missing a bunch of setup tasks because these tests > should not be able to pass as I first attempted to run them in > PHPUnit. Or maybe I should be running the tests all at once? No, every test should be runnable standalone and may never depend on data set/generated by previous tests. This has several reasons: - Tests just may be run alone by i.e. > phpunit --filter $nameoftestmethod . - You could activate process isolation in phpunit which means every test is run in an different php instance. -- Regards/Mit freundlichen Grüßen Christian Weiske -=≡ Geeking around in the name of science since 1982 ≡=- |
From: Brett D. <bs...@fr...> - 2011-04-14 04:42:23
|
Hello, Christian. I'm having trouble with a few items in PostsAddTest.php. I tried to run this test in PHPUnit and kept getting 404 responses from the Web server. Then I noticed line 36: protected $urlPart = 'api/posts/add'; I thought maybe this should be 'api/posts_add' and changed it. That eliminated the 404s, and so I thought it might be a mistake, but I was also unable to get the tests to run without explicitly specifying $urlSuffix because it was not getting set in TestBaseApi.php. I assume that I'm missing a bunch of setup tasks because these tests should not be able to pass as I first attempted to run them in PHPUnit. Or maybe I should be running the tests all at once? Rgrds, Brett > On Wed, 6 Apr 2011 09:55:01 +0200, Christian Weiske > <cw...@cw...> wrote: >> Hello Brett, >> >> About your tests: >> - You assume that the default privacy is configured to the default one, >> but that's something you cannot assume. If you do such assumptions, >> at least do a assertion on your assumed variable so the test fails >> with an explanatory message. >> - You assume a default privacy setting since there was no way to >> configure the privacy permanently for http requests - up to now! In >> the jquery branch, I had the same problem and solved it; the >> testbaseapi class has a way to set default configuration values. >> - You had one big method in BookmarksTest that checked all the >> different api methods. In general, keeping test methods small is a >> really good idea since in case of a failure, you can narrow down the >> problematic code line much faster. The rule of thumb is to test one >> thing in a test (but I don't want only one assertion in one test >> method, that'd be overkill). >> - I began to split up the big test method and >> moved the api/posts_add test to their corresponding Api test >> class. By doing that I could utilize the TestBaseApi methods that >> prepare authorized HTTP requests automatically for you if you wish >> that. Do the same for the rest of the tests in there. >> - In tests, always use example.org as hostname, or example.com and >> example.net (of course, you can use foo.example.org, >> example.org/foobar and such). >> - You assume that new bookmarks always get ID 1 in your tests. That >> might not always be the case, especially with database systems other >> than mysql. Better than fetching bookmark ID 1 is to fetch all >> bookmarks of the user with the ID you just created which keeps you on >> the safe side. >> - Assuming http://localhost/ as URL fails for my setup since I have >> "http://bm.bogo/" as URL under which my dev instance of SC is >> available. TestBaseApi takes care of this. >> |
From: Mark P. <mpe...@gm...> - 2011-04-13 04:37:02
|
It doesn't appear to be needed. I had duplicated the login() function and apparently didn't go back to review all the code that was in there. Good catch. On Tue, Apr 12, 2011 at 3:37 AM, Christian Weiske <cw...@cw...>wrote: > Hi Mark, > > > When writing some unit tests I discovered that > SemanticScuttle_Service_User::loginPrivateKey() actually sets the user > id in the session! > In www/rss.php, a "templogin" variable is set when the private key is > passed, and the user logged out when the script finishes. > > Is there a reason to store it in the session? This way we would not get > problems if the rss script crashes - currently, the user stays logged > in in that case. Isn't it sufficient to just set the current user Id > without modifying the session? > > -- > Regards/Mit freundlichen Grüßen > Christian Weiske > > -=≡ Geeking around in the name of science since 1982 ≡=- > > > ------------------------------------------------------------------------------ > Forrester Wave Report - Recovery time is now measured in hours and minutes > not days. Key insights are discussed in the 2010 Forrester Wave Report as > part of an in-depth evaluation of disaster recovery service providers. > Forrester found the best-in-class provider in terms of services and vision. > Read this report now! http://p.sf.net/sfu/ibm-webcastpromo > _______________________________________________ > Semanticscuttle-devel mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semanticscuttle-devel > > |
From: Christian W. <cw...@cw...> - 2011-04-12 07:37:55
|
Hi Mark, When writing some unit tests I discovered that SemanticScuttle_Service_User::loginPrivateKey() actually sets the user id in the session! In www/rss.php, a "templogin" variable is set when the private key is passed, and the user logged out when the script finishes. Is there a reason to store it in the session? This way we would not get problems if the rss script crashes - currently, the user stays logged in in that case. Isn't it sufficient to just set the current user Id without modifying the session? -- Regards/Mit freundlichen Grüßen Christian Weiske -=≡ Geeking around in the name of science since 1982 ≡=- |
From: Brett D. <bs...@fr...> - 2011-04-09 00:48:10
|
Hello, Christian. Thanks for the helpful suggestions. I will work to improve the tests this weekend. Rgrds, Brett On Wed, 6 Apr 2011 09:55:01 +0200, Christian Weiske <cw...@cw...> wrote: > Hello Brett, > > >> I have some concerns about the fact that there were Windows >> carriage returns in my last check-in. I am working on a Windows >> environment--I will eventually set up a Linux environment, but not >> for a few weeks at least--but I've been editing files with vi on >> Cygwin and MKS Toolkit, so there should not have been any Windows >> carriage returns. > No problem. Someone noticed it, now it's fixed, all is fine :) > >> Any tips/advice you have concerning this would be >> appreciated. > Sorry, I've never worked with cygwin or so. I know that many > editors/IDEs on windows are able to save files with unix newlines only, > i.e. Notepad++ and all the PHP IDEs. > > >> Here are a few things I noticed when testing import.php and >> importNetscape.php: >> 1. import.php points the user to http://del.icio.us/api/posts/all to >> save bookmarks to an XML file. This is evidently not a good option any >> longer for "new" del.icio.us users who are using a Yahoo! ID to access >> their bookmarks. A better option for these users is to go to the >> Delicious XML Exporter at http://deliciousxml.com/. Otherwise, they >> must use http://api.del.icio.us/v2/posts/all with open authorization, >> and that complicates the process somewhat. > Yep, we should change that. > >> 2. I think I may have found a bug in importNetscape.php, which ignores >> the last bookmark in the specified HTML file. I think this is >> occurring in the regular expression given as the first parameter of >> the preg_match_all function call. Consequently, my test data contains >> a last entry that I have assumed will be ignored. The test will need >> to be updated if this behavior in importNetscape.php changes. > Ok, I'll see if I can fix that. > > > About your tests: > - You assume that the default privacy is configured to the default one, > but that's something you cannot assume. If you do such assumptions, > at least do a assertion on your assumed variable so the test fails > with an explanatory message. > - You assume a default privacy setting since there was no way to > configure the privacy permanently for http requests - up to now! In > the jquery branch, I had the same problem and solved it; the > testbaseapi class has a way to set default configuration values. > - You had one big method in BookmarksTest that checked all the > different api methods. In general, keeping test methods small is a > really good idea since in case of a failure, you can narrow down the > problematic code line much faster. The rule of thumb is to test one > thing in a test (but I don't want only one assertion in one test > method, that'd be overkill). > - I began to split up the big test method and > moved the api/posts_add test to their corresponding Api test > class. By doing that I could utilize the TestBaseApi methods that > prepare authorized HTTP requests automatically for you if you wish > that. Do the same for the rest of the tests in there. > - In tests, always use example.org as hostname, or example.com and > example.net (of course, you can use foo.example.org, > example.org/foobar and such). > - You assume that new bookmarks always get ID 1 in your tests. That > might not always be the case, especially with database systems other > than mysql. Better than fetching bookmark ID 1 is to fetch all > bookmarks of the user with the ID you just created which keeps you on > the safe side. > - Assuming http://localhost/ as URL fails for my setup since I have > "http://bm.bogo/" as URL under which my dev instance of SC is > available. TestBaseApi takes care of this. > > I cherry-picked the two relevant changes to testbaseapi into your > branch. You still need to merge master, though. |
From: Christian W. <cw...@cw...> - 2011-04-08 06:46:29
|
Hello Mark, I merged the master branch into your privatekey branch so that it got the latest API fixes and unittest helpers. Your earlier whitespace changes made merging a tough job; I had to manually resolve conflicts in about 15 files :/ After merging, tests did not run because automatic merge apparently didn't work for the testbase class, but I fixed it and now the unit tests do work again. I did not do any manual browser tests yet, so things may be broken. Merging was nevertheless necessary to ease merging into the master branch once the privatekey feature is finished. -- Regards/Mit freundlichen Grüßen Christian Weiske -=≡ Geeking around in the name of science since 1982 ≡=- |
From: Christian W. <cw...@cw...> - 2011-04-08 04:55:06
|
Hello Mark, > > Generating new key throws away form changes. This isn't that nice, > > but I'll accept it for now and we can fix that when the quickform > > branch is finished. > If quickform is not far off, then I agree. I'm a bit agitated for > missing this one, so if it needs to be corrected now, I'll be glad to > do it. I don't think that it's too far off - it's the next branch I'm working on. Should be in 0.99 or 0.100.0 -- Regards/Mit freundlichen Grüßen Christian Weiske -=≡ Geeking around in the name of science since 1982 ≡=- |
From: Mark P. <mpe...@gm...> - 2011-04-07 23:39:06
|
> Does not work with all bookmarks (plain rss.php?privatekey) - I'm > likely to subscribe to the all bookmarks feed in a private SC setup > with a several users. Totally missed this. I bet unit testing would have caught it..... :( > Generating new key throws away form changes. This isn't that nice, > but I'll accept it for now and we can fix that when the quickform > branch is finished. If quickform is not far off, then I agree. I'm a bit agitated for missing this one, so if it needs to be corrected now, I'll be glad to do it. > 1) BookmarkTest::testPrivateBookmarks > Undefined offset: 1 > /home/cweiske/Dev/semanticscuttle/cwdev/tests/BookmarkTest.php:1387 Ok then I guess we can test the size of the array instead of the value. I'll replace it with this: $this->assertEquals(count($bookmarks['bookmarks']),1); On Thu, Apr 7, 2011 at 4:57 PM, Christian Weiske <cw...@cw...> wrote: > Hello Mark, > > > > > Yep, made some final changes last night and didn't get a chance to > > > commit. I just committed my work so please review. Ok, I confess, > > > I haven't done the below: > > And just a heads-up, I tried to test everything regarding the special > > characters with the titles, etc. If you find something that is not > > right, let me know. > > + Privatekey works fine for the user's own bookmarks > - Does not work with all bookmarks (plain rss.php?privatekey) - I'm > likely to subscribe to the all bookmarks feed in a private SC setup > with a several users. > + Enabling and disabling the private key works fine > + Error page when accessing feed with wrong private key > + Error page when accessing feed with disabled private key > - Generating new key throws away form changes. This isn't that nice, > but I'll accept it for now and we can fix that when the quickform > branch is finished. > - 1) BookmarkTest::testPrivateBookmarks > Undefined offset: 1 > /home/cweiske/Dev/semanticscuttle/cwdev/tests/BookmarkTest.php:1387 > > I did also run the unit tests with with coverage enabled and saw that > i.e. "getUserByPrivateKey" is not tested. I'll help you with writing > the tests. > > -- > Regards/Mit freundlichen Grüßen > Christian Weiske > > -=≡ Geeking around in the name of science since 1982 ≡=- > > > ------------------------------------------------------------------------------ > Xperia(TM) PLAY > It's a major breakthrough. An authentic gaming > smartphone on the nation's most reliable network. > And it wants your games. > http://p.sf.net/sfu/verizon-sfdev > _______________________________________________ > Semanticscuttle-devel mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semanticscuttle-devel > > |
From: Christian W. <cw...@cw...> - 2011-04-07 20:57:59
|
Hello Mark, > > Yep, made some final changes last night and didn't get a chance to > > commit. I just committed my work so please review. Ok, I confess, > > I haven't done the below: > And just a heads-up, I tried to test everything regarding the special > characters with the titles, etc. If you find something that is not > right, let me know. + Privatekey works fine for the user's own bookmarks - Does not work with all bookmarks (plain rss.php?privatekey) - I'm likely to subscribe to the all bookmarks feed in a private SC setup with a several users. + Enabling and disabling the private key works fine + Error page when accessing feed with wrong private key + Error page when accessing feed with disabled private key - Generating new key throws away form changes. This isn't that nice, but I'll accept it for now and we can fix that when the quickform branch is finished. - 1) BookmarkTest::testPrivateBookmarks Undefined offset: 1 /home/cweiske/Dev/semanticscuttle/cwdev/tests/BookmarkTest.php:1387 I did also run the unit tests with with coverage enabled and saw that i.e. "getUserByPrivateKey" is not tested. I'll help you with writing the tests. -- Regards/Mit freundlichen Grüßen Christian Weiske -=≡ Geeking around in the name of science since 1982 ≡=- |
From: Mark P. <mpe...@gm...> - 2011-04-06 18:56:42
|
And just a heads-up, I tried to test everything regarding the special characters with the titles, etc. If you find something that is not right, let me know. On Wed, Apr 6, 2011 at 2:52 PM, Mark Pemberton <mpe...@gm...>wrote: > Yep, made some final changes last night and didn't get a chance to commit. > I just committed my work so please review. Ok, I confess, I haven't done > the below: > > "The API tests look really good. What I miss is tests that query the > actual feed URLs with parameters; see the API tests that do > ->getRequest()->send()." > > I was hoping to do them last week when I thought I would have the time, but > never got to it. I will try to complete that this evening. > > Cheers! > Mark > > On Wed, Apr 6, 2011 at 1:02 PM, Christian Weiske <cw...@cw...>wrote: > >> Hello Mark, >> >> >> > Well that was easy.... :) Thanks for the tip! I'll finish up on the >> > unit tests and hopefully we'll be done. >> Any updates? >> >> -- >> Regards/Mit freundlichen Grüßen >> Christian Weiske >> >> -=≡ Geeking around in the name of science since 1982 ≡=- >> >> >> ------------------------------------------------------------------------------ >> Xperia(TM) PLAY >> It's a major breakthrough. An authentic gaming >> smartphone on the nation's most reliable network. >> And it wants your games. >> http://p.sf.net/sfu/verizon-sfdev >> >> _______________________________________________ >> Semanticscuttle-devel mailing list >> Sem...@li... >> https://lists.sourceforge.net/lists/listinfo/semanticscuttle-devel >> >> > |