FreshPorts -- The Place For Ports If you buy from Amazon USA, please support us by using this link.
Follow us
Blog
Twitter

Website Feedback
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Previous Message  |  Next Message 
 Comparing test and production websites - want to write a script?
Author: JunkMale 
Date:   22-05-02 01:53

Here's an idea that has been kicking around for a while. I want to compare two websites, the production one and my test one. This is just a simple test: make sure the two websites have the same commits over the past hour. Then we could run a cronjob from a third computer, compare the results of the two URLs and then post the results in a log.

The URLs would be very simple. They could be compare via diff.

Here is how I did it:

[dan@xeon:~/tmp] $ fetch -o test.txt http://test.freshports.org/backend/commits.php
fetch: test.txt: size of remote file is not known
Receiving test.txt: 5671 bytes
5671 bytes transferred in 0.4 seconds (13.46 kBps)
[dan@xeon:~/tmp] $ fetch -o beta.txt http://migration.freshports.org/backend/commits.php
fetch: beta.txt: size of remote file is not known
Receiving beta.txt: 5671 bytes
5671 bytes transferred in 0.0 seconds (4.20 MBps)
[dan@xeon:~/tmp] $ diff beta.txt test.txt
[dan@xeon:~/tmp] $

Take it from there. Create the cronjob. Compare the two URLs. Store the results. Log it. Send off an email if there are differences, providing a URL to the differences.

Have fun. Take it as far as you want.

--
Dan Langille - webmaster

 Reply To This Message  |  Forum List  |  Flat View   Newer Topic  |  Older Topic 

 
 Topics Author  Date
 Comparing test and production websites - want to write a script?   new
JunkMale 22-05-02 01:53 
 Re: Comparing test and production websites - want to write a script?   new
dagoon 22-05-02 07:15 
 Re: Comparing test and production websites - want to write a script?   new
JunkMale 22-05-02 13:09 
 Re: Comparing test and production websites - want to write a script?   new
dagoon 22-05-02 13:18 
 Re: Comparing test and production websites - want to write a script?   new
JunkMale 22-05-02 18:19 
 Re: Comparing test and production websites - want to write a script?   new
dagoon 23-05-02 14:15 
 Re: Comparing test and production websites - want to write a script?   new
JunkMale 23-05-02 17:37 
 Re: Comparing test and production websites - want to write a script?   new
dagoon 24-05-02 12:30 
 Re: Comparing test and production websites - want to write a script?   new
JunkMale 24-05-02 13:33 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.


Servers and bandwidth provided by
New York Internet, SuperNews, and RootBSD
Valid HTML, CSS, and RSS.
Copyright © 2000-2013 DVL Software Limited. All rights reserved.