X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=doc%2Fwebserver%2Fdeveloper-manual%2Ftesting.html;h=8d5ce3dc346480e574a924b6db732fddbf07b025;hp=b49839d9c504bc225a8ffb600b106012c1b685ea;hb=61a5d3fc15169d9f6b0c21e3a56d893f4d672eb4;hpb=659cbbc13f413ed0c5dacd4d03060f48eb500011 diff --git a/doc/webserver/developer-manual/testing.html b/doc/webserver/developer-manual/testing.html index b49839d9..8d5ce3dc 100644 --- a/doc/webserver/developer-manual/testing.html +++ b/doc/webserver/developer-manual/testing.html @@ -1,204 +1,87 @@ - -Testing Guidelines
Privoxy Developer Manual
PrevNext

5. Testing Guidelines

To be filled.

5.1. Testplan for releases

Explain release numbers. major, minor. developer releases. etc. -

  1. Remove any existing rpm with rpm -e

  2. Remove any file that was left over. This includes (but is not limited to) -

    • /var/log/privoxy

    • /etc/privoxy

    • /usr/sbin/privoxy

    • /etc/init.d/privoxy

    • /usr/doc/privoxy*

  3. Install the rpm. Any error messages?

  4. start,stop,status Privoxy with the specific script - (e.g. /etc/rc.d/init/privoxy stop). Reboot your machine. Does - autostart work?

  5. Start browsing. Does Privoxy work? Logfile written?

  6. Remove the rpm. Any error messages? All files removed?

5.2. Testing with Privoxy-Regression-Test

If you compiled, packaged or merely installed Privoxy, it is recommended to run - Privoxy-Regression-Test to verify that at least - the tested parts of Privoxy are working as expected. -

This is actually pretty easy. For details, please see - perldoc privoxy-regression-test.pl. -

Here is an example of what Privoxy-Regression-Test can do for you: -

+ +
  # Run all the tests
+
+
+
+  Testing Guidelines
+  
+  
+  
+  
+  
+  
+
+
+  
+  
+

5. Testing Guidelines

+

To be filled.

+
+

5.1. Testplan for releases

+

Explain release numbers. major, minor. developer releases. etc.

+
    +
  1. +

    Remove any existing rpm with rpm -e

    +
  2. +
  3. +

    Remove any file that was left over. This includes (but is not limited to)

    +
      +
    • +

      /var/log/privoxy

      +
    • +
    • +

      /etc/privoxy

      +
    • +
    • +

      /usr/sbin/privoxy

      +
    • +
    • +

      /etc/init.d/privoxy

      +
    • +
    • +

      /usr/doc/privoxy*

      +
    • +
    +
  4. +
  5. +

    Install the rpm. Any error messages?

    +
  6. +
  7. +

    start,stop,status Privoxy with the specific script (e.g. + /etc/rc.d/init/privoxy stop). Reboot your machine. Does autostart work?

    +
  8. +
  9. +

    Start browsing. Does Privoxy work? Logfile written?

    +
  10. +
  11. +

    Remove the rpm. Any error messages? All files removed?

    +
  12. +
+
+
+

5.2. Testing with Privoxy-Regression-Test

+

If you compiled, packaged or merely installed Privoxy, it is recommended to run Privoxy-Regression-Test to verify that at least the tested parts of Privoxy are working as expected.

+

This is actually pretty easy. For details, please see perldoc + privoxy-regression-test.pl.

+

Here is an example of what Privoxy-Regression-Test can do for you:

+ + +
+
  # Run all the tests
   fk@t520 ~ $privoxy-regression-test.pl
   2020-12-14 12:16:32: Asking Privoxy for the number of action files available ...
   2020-12-14 12:16:32: Gathering regression tests from 9 action file(s) delivered by Privoxy 3.0.30.
@@ -217,44 +100,22 @@ CLASS="PROGRAMLISTING"
   2020-12-14 12:17:56: Executing: curl --include  -H 'Proxy-Connection:'  -H 'Connection: close'  -s  -S  --user-agent 'Privoxy-Regression-Test 0.7.2'  --max-time '5'  --globoff  -H 'X-Privoxy-Control: hide-referrer{conditional-block}' -H 'Referer: https://p.p/'  http://p.p/show-request 2>&1
   2020-12-14 12:17:56: Ooops. Expected removal but: 'Referer: https://p.p/' is still there.
   2020-12-14 12:17:56: Failure for test 785 (0/13/5). Header 'Referer: https://p.p/' and tag 'hide-referrer{conditional-block}'
-  2020-12-14 12:17:56: Executed 1 regression tests. Skipped 1201. 0 successes, 1 failures.

Use the if the --privoxy-address option if the - http_proxy environment variable isn't configured and you don't want - to use the default (http://127.0.0.1:8118/). -

5.3. Fuzzing Privoxy

To make fuzzing more convenient, Privoxy can be configured - with --enable-fuzz which will result in the --fuzz option - becoming available. -

Example (tested on ElectroBSD): -

+ +
  # Compile Privoxy with instrumentation for afl
+  2020-12-14 12:17:56: Executed 1 regression tests. Skipped 1201. 0 successes, 1 failures.
+
+

Use the if the --privoxy-address option if the http_proxy environment variable isn't + configured and you don't want to use the default (http://127.0.0.1:8118/).

+
+
+

5.3. Fuzzing Privoxy

+

To make fuzzing more convenient, Privoxy can be configured with --enable-fuzz which will result in the --fuzz + option becoming available.

+

Example (tested on ElectroBSD):

+ + +
+
  # Compile Privoxy with instrumentation for afl
   $ export CC=afl-clang
   $ export CFLAGS="-fsanitize=address -ggdb"
   $ export CPPFLAGS=-I/usr/local/include/
@@ -303,70 +164,26 @@ CLASS="PROGRAMLISTING"
   FILTER: bla fasel
   s@(.{1})[432](\d+)@$1$2$hostname@UgisT
 
-  $ afl-fuzz -i input/ -o output/ -f bla.filter -m none privoxy --fuzz filter bla.filter --stfu

PrevHomeNext
Coding Guidelines Releasing a New Version
\ No newline at end of file + $ afl-fuzz -i input/ -o output/ -f bla.filter -m none privoxy --fuzz filter bla.filter --stfu
+
+
+
+ + +