Testing if you get the desired content

I strongly recommend using the provided test scripts for testing when you add new feeds or change filters for existing feeds. Both scripts should be run in a command window and not by double-clicking. The test scripts are meant for testing certain aspects of feed configuration. They are not meant for troubleshooting more serious problems like not getting anything or refetching apparently old articles and such from a feed or troubleshooting the feeder operation in general. If you want to troubleshoot such a problem look on the Troubleshooting page.

Before doing the following tests you can also look at the header of the article/message (press H), which contains some processing headers that may carry useful information about the problem.

If you want to use the print version of a feed it's recommended to first test with test_url.php if the URL translation works and then with test_feed.php if you get the desired content.

The test_feed.php script fetches the first currently available article for a specified feed of the feeds.ini, processes it with filters and all (as configured in feeds.ini) and then places the result as an html page in the test subdirectory. You can use it to control if you get the right pages/articles and if your filters work like desired, in other words: if you get the right content for display in VA. Once you are satisfied you can enable the feed for normal fetching.

The test_url.php is a bit different. It's used for testing the resulting page URL from a feed URL you set for a feed in feeds.ini. It's especially useful for testing if the translation to the print version URL works. When run it fetches the article list for the specified feed and displays the first article URL from it. In case using the print version is set it will translate the URL to the print version URL and display the resulting URL. You can then use that URL and check with your browser if the page exists and actually is the one you want to get. If it cannot produce the print version URL from what you configured it will tell you.


If you want to use the test scripts you have to number the feeds in feeds.ini like this id = 16. That is, at least the one feed you want to test has to have a number (= id). Numbers have to be unique for each feed, but don't need to be in consecutive order. It's recommended that you add an id option to each feed, but it's not required for the operation of the Feeder, it's only necessary for the test scripts. The reason for this is that it is much easier to type a number than to type a full feed name like "[Feed Spiegel Online Wissenschaft]" in the command line.

php test_url.php 1 tests article URL of feed 1
php test_feed.php 1 fetches first article of feed 1, processes filters and saves it to test directory

Tests can be done on enabled and disabled feeds and there is no data written to data.ini, so you cannot spoil any already running feeds.

Remember, there's also the php feeder.php 1 command for testing which articles the feed would fetch, this is also done without writing data. See the Troubleshooting page for details.

vaosfeeds/testing.txt · Last modified: 14.05.2007 21:13 by kai
Recent changes RSS feed Driven by DokuWiki