Testing: Difference between revisions

Jump to navigation Jump to search
519 bytes removed ,  4 October 2021
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:


== troubleshooting steps for connection test ==
== Test connectivity to the web service ==
find the problem occurred: (1) local service at the server (localhost) (2) from LAN to server (3) from WAN to server
find the problem occurred: (1) local service at the server (localhost) (2) from LAN to server (3) from WAN to server




=== (1) local service ===
=== Connecting from the local server to local service ===
WAN &#9675; -------&gt; &#9675; LAN -------&gt; <span style="color:red">&#9679; server</span>
WAN &#9675; -------&gt; &#9675; LAN -------&gt; <span style="color:red">&#9679; server</span>


Line 17: Line 17:
*** [http://linux.die.net/man/8/ss ss] "utility to investigate sockets" e.g. {{kbd | key = <nowiki>ss -tnlp | grep 80</nowiki>}} or using OR operator<ref>[http://www.thegeekstuff.com/2011/10/grep-or-and-not-operators/ 7 Linux Grep OR, Grep AND, Grep NOT Operator Examples]</ref> {{kbd | key = <nowiki>ss -tnlp | grep '80\|443'</nowiki>}}
*** [http://linux.die.net/man/8/ss ss] "utility to investigate sockets" e.g. {{kbd | key = <nowiki>ss -tnlp | grep 80</nowiki>}} or using OR operator<ref>[http://www.thegeekstuff.com/2011/10/grep-or-and-not-operators/ 7 Linux Grep OR, Grep AND, Grep NOT Operator Examples]</ref> {{kbd | key = <nowiki>ss -tnlp | grep '80\|443'</nowiki>}}
*** [http://linuxcommand.org/man_pages/ps1.html ps] List the current processes. Input {{kbd | key = <nowiki>ps -aux | grep "PORT_NUMBER"</nowiki>}} e.g. {{kbd | key = <nowiki>ps -aux | grep 443</nowiki>}}
*** [http://linuxcommand.org/man_pages/ps1.html ps] List the current processes. Input {{kbd | key = <nowiki>ps -aux | grep "PORT_NUMBER"</nowiki>}} e.g. {{kbd | key = <nowiki>ps -aux | grep 443</nowiki>}}
*** [https://docs.oracle.com/cd/E19504-01/802-5753/6i9g71m3i/index.html netstat Command] {{kbd | key=<nowiki>netstat -tulpn | grep LISTEN</nowiki>}} e.g.
** {{Win}} Using the software [http://www.nirsoft.net/utils/cports.html CurrPorts] to check the process and port. e.g. Apache will not running if the 80 port was occupied by skype<ref>[http://stackoverflow.com/questions/4705005/how-to-solve-wamp-and-skype-conflict-on-windows-7 How to solve WAMP and Skype conflict on Windows 7? - Stack Overflow]</ref>.
** {{Win}} Using the software [http://www.nirsoft.net/utils/cports.html CurrPorts] to check the process and port. e.g. Apache will not running if the 80 port was occupied by skype<ref>[http://stackoverflow.com/questions/4705005/how-to-solve-wamp-and-skype-conflict-on-windows-7 How to solve WAMP and Skype conflict on Windows 7? - Stack Overflow]</ref>.
<pre>
$ netstat -tulpn | grep LISTEN
tcp        0      0 0.0.0.0:80              0.0.0.0:*              LISTEN      -
// means the 80 port service is running
</pre>
* Is the port opened for external users? OS firewall or protected by antivirus software.
* Is the port opened for external users? OS firewall or protected by antivirus software.
** {{Linux}}
** {{Linux}}
Line 30: Line 40:
* double [[Testing#check_the_server.2Fservice_logs | check the server/service logs]]
* double [[Testing#check_the_server.2Fservice_logs | check the server/service logs]]


=== (2) from LAN to server ===
=== Connecting from LAN to the server ===
WAN &#9675; -------&gt; <span style="color:red">&#9679; LAN -------&gt; &#9679; server</span>
WAN &#9675; -------&gt; <span style="color:red">&#9679; LAN -------&gt; &#9679; server</span>


* testing on LAN (local network, subnet scope): Is service alive? The different servers between LAN or with the same ip class (ex: 1.2.3.*) may not have the firewall limit.
Testing on LAN (local network, subnet scope): The different servers between LAN or with the same ip class (ex: 1.2.3.*) may not have the firewall limit.
** connect to localhost ex: {{kbd | key= telnet 172.18.0.1 23}} (1) IP start with 172.18... is [http://www.itcom.itd.umich.edu/backbone/umnet/privateIP.html Private IP Network Numbers] (2) where 23 is the port number where the service running
 
*** If the local service is web server, you can also try to connect the internal ip e.g. {{kbd | key = <nowiki>lynx http://172.18.0.1</nowiki>}} for {{Linux}}
* Is the service alive?
* double [[Testing#check_the_server.2Fservice_logs | check the server/service logs]]
* Connect to the internal IP eg: {{kbd | key= telnet 172.18.0.1 23}} (1) IP start with 172.18... is [http://www.itcom.itd.umich.edu/backbone/umnet/privateIP.html Private IP Network Numbers] (2) where 23 is the port number where the service running
* If the local service is web server, you can also try to connect the internal IP e.g. {{kbd | key = <nowiki>lynx http://172.18.0.1</nowiki>}} for {{Linux}}
* Double [[Testing#check_the_server.2Fservice_logs | check the server/service logs]]


=== (3)  from WAN to server ===
=== Connecting from WAN to the server ===
<span style="color:red">WAN &#9679; -------&gt; &#9679; LAN -------&gt; &#9679; server</span>
<span style="color:red">WAN &#9679; -------&gt; &#9679; LAN -------&gt; &#9679; server</span>


Line 59: Line 71:
* refresh browser cache: [http://refreshyourcache.com/en/cache/ Refresh your cache - When hitting F5 just isn't enough!]
* refresh browser cache: [http://refreshyourcache.com/en/cache/ Refresh your cache - When hitting F5 just isn't enough!]


== connection test ==
== Connection test ==
=== case 1: Access the server from outside network ex: WAN ===
=== Case 1: Access the server from outside network ex: WAN ===
Where are you? Access the server from outside network ex: Wide Area Network (WAN) or Local Area Network (LAN)
Where are you? Access the server from outside network ex: Wide Area Network (WAN) or Local Area Network (LAN)


open the browser from outside network ex: Wide Area Network (WAN) or Local Area Network (LAN)
Open the browser from outside network ex: Wide Area Network (WAN) or Local Area Network (LAN)
* and type the address: {{kbd | key =<nowiki>http://the.domain</nowiki>}} {{exclaim}} Note: Not [https://en.wikipedia.org/wiki/Private_network Private network] / Private IP address
* and type the address: {{kbd | key =<nowiki>http://the.domain</nowiki>}} {{exclaim}} Note: Not [https://en.wikipedia.org/wiki/Private_network Private network] / Private IP address
* or use the remote website monitoring services: [[Web Ping]]  
* or use the remote website monitoring services: [[Web Ping]]  
Using alternative web services if the Python was installed
* (for python 2.x) {{kbd | key=<nowiki>python -m SimpleHTTPServer <port></nowiki>}}<ref>[https://docs.python.org/2/library/simplehttpserver.html 20.19. SimpleHTTPServer — Simple HTTP request handler — Python 2.7.17 documentation]</ref>
* (for python 3.x) {{kbd | key=<nowiki>python -m http.server <port></nowiki>}}<ref>[https://docs.python.org/3.8/library/http.server.html?highlight=http%20server#module-http.server http.server — HTTP servers — Python 3.8.1 documentation]</ref>


Using telnet client
Using telnet client
Line 79: Line 95:
# [http://check-host.net/ Check server: Check host - online website monitoring, Check IP] "checks the possibility of a TCP connection to host's specified port from different locations around the world." quoted from website. {{access | date=2015-08-02}}
# [http://check-host.net/ Check server: Check host - online website monitoring, Check IP] "checks the possibility of a TCP connection to host's specified port from different locations around the world." quoted from website. {{access | date=2015-08-02}}


=== case 2: Access the server from inside ex: localhost or Local LAN ===
=== Case 2: Access the server from inside ex: localhost or Local LAN ===
If you has permission to log in the server via SSH or Remote desktop service.
If you has permission to log in the server via SSH or Remote desktop service.
* (1)open the browser, (2)type the address: {{kbd | key = <nowiki>http://127.0.0.1</nowiki> }}
* (1)open the browser, (2)type the address: {{kbd | key = <nowiki>http://127.0.0.1</nowiki> }}
Line 100: Line 116:
# [http://portforward.com/help/portcheck.htm PFPortCheck Program]: check TCP/UDP port from localhost(where you installed the program) to portforward.com
# [http://portforward.com/help/portcheck.htm PFPortCheck Program]: check TCP/UDP port from localhost(where you installed the program) to portforward.com
# [http://technet.microsoft.com/en-us/sysinternals/bb897437 TCPView for Windows]
# [http://technet.microsoft.com/en-us/sysinternals/bb897437 TCPView for Windows]


== user client node ==
== user client node ==
Line 115: Line 129:
* Clear server cache ex: [http://www.smarty.net/manual/en/caching.php Smarty Caching]
* Clear server cache ex: [http://www.smarty.net/manual/en/caching.php Smarty Caching]


==== online IDE ====
==== Online IDE ====
code snippet web-based editor  / communication tools between developers/designers
[[Programming online (Online IDE)]]
* [http://codepad.org/ codepad] {{access | date=2012-10-02}} {{access | date = 2014-10-07}}
* [http://cssdesk.com/ CSSDesk] HTML, CSS {{access | date=2013-02-11}}
* [http://dabblet.com/ The first commented line is your dabblet’s title ✿ dabblet.com]: view the [http://dabblet.com/gist/2779082 sample] of html and css {{access | date = 2012-08-22}}
* [http://ideone.com/ Ideone.com] "Online IDE & Debugging Tool >> C/C++, Java, PHP, Python, Perl and 40+ compilers and interpreters"
* [http://jsbin.com/ JS Bin - Collaborative JavaScript Debugging]: HTML, CSS, Javascript<ref>[http://blog.miniasp.com/post/2013/06/30/Useful-tool-JS-Bin-Collaborative-JavaScript-Debugging.aspx The Will Will Web - 介紹好用工具:JS Bin ( 網站前端工程師的學習利器 )]</ref>
* [http://jsfiddle.net/ jsFiddle] {{access | date = 2014-10-07}}
* [http://plnkr.co/ Plunker] support JS, Angular, React, AngularJS & Preact {{access | date = 2018-08-08}}
* [https://implode.io/ Implode.io] for PHP {{access | date = 2018-03-15}}
* [https://rextester.com/ Rextester] {{access | date = 2019-01-13}}
 
database testing
* [http://ideone.com/ Ideone.com] support SQL {{exclaim}} not support REGEXP function {{access | date = 2015-03-09}}
* [http://sqlfiddle.com/ SQL fiddle] support MySQL, MS SQL server, Oracle, PostgreSQL, SQLite ...  {{exclaim}} data may not showed in couple days {{access | date = 2015-03-09}}
 
Save or share source codes
* [http://pastie.org/ Pastie] with syntax highlighting
* [http://pastebin.com/ Pastebin.com - #1 paste tool since 2002!]
* [http://tny.cz/ Tinypaste - The easiest way to host your text]


=== browser plug-ins issue ===
=== browser plug-ins issue ===
Line 154: Line 150:
Modify the following files if you want to test the domain name before the mapping of domain name and ip was changed really
Modify the following files if you want to test the domain name before the mapping of domain name and ip was changed really
* C:\WINDOWS\system32\drivers\etc\hosts for {{win}} XP, Win7<ref>[http://tommy.ironman.tw/windows-7-vista-hosts-error/ Azan 黃贊臣 » 在Windows 7 或 Vista 中修改hosts檔的方法]</ref>, Win 10 & Windows Server 2008 R2 Standard
* C:\WINDOWS\system32\drivers\etc\hosts for {{win}} XP, Win7<ref>[http://tommy.ironman.tw/windows-7-vista-hosts-error/ Azan 黃贊臣 » 在Windows 7 或 Vista 中修改hosts檔的方法]</ref>, Win 10 & Windows Server 2008 R2 Standard
* C:\WINNT\system32\drivers\etc\hosts for Windows 2003 server
* On Windows 2003 server: edit the file located at {{kbd | key=<nowiki>C:\WINNT\system32\drivers\etc\hosts</nowiki>}}
* {{kbd | key=<nowiki>/etc/hosts</nowiki>}} for {{Linux}}
* On {{Linux}}, input the command {{kbd | key=<nowiki>sudo vi /etc/hosts</nowiki>}}
<pre>
<pre>
127.0.0.1      localhost
127.0.0.1      localhost
# ip            domain.com
# ip            domain.com
</pre>
</pre>
* {{kbd | key=<nowiki>/private/etc/hosts</nowiki>}}  for {{Mac}} <ref>[https://www.tekrevue.com/tip/edit-hosts-file-mac-os-x/ How to Edit the Hosts File on Mac OS X - TekRevue]</ref>
* On {{Mac}}, input the command {{kbd | key=<nowiki>sudo vi /private/etc/hosts</nowiki>}} <ref>[https://www.tekrevue.com/tip/edit-hosts-file-mac-os-x/ How to Edit the Hosts File on Mac OS X - TekRevue]</ref>




Line 291: Line 287:
* [http://help.trello.com/article/736-troubleshooting-browser-issues-with-trello Troubleshooting browser issues with Trello - Trello Help] {{access | date = 2017-03-28}}
* [http://help.trello.com/article/736-troubleshooting-browser-issues-with-trello Troubleshooting browser issues with Trello - Trello Help] {{access | date = 2017-03-28}}
* [https://asana.com/guide/help/faq/connectivity Supported browsers and troubleshooting steps for Asana | Product guide · Asana] {{access | date = 2017-03-28}}
* [https://asana.com/guide/help/faq/connectivity Supported browsers and troubleshooting steps for Asana | Product guide · Asana] {{access | date = 2017-03-28}}
* [https://ngrok.com/ ngrok - secure introspectable tunnels to localhost] {{access | date = 2020-02-20}}


{{Template:Build a website}}
{{Template:Build a website}}
Anonymous user

Navigation menu