3

It was accidental but it's a required feature for most of the modern automation tools.

Yesterday I made one automation script job on a remote machine and it will be supposed to run on schedule time at 6 AM. It's also executed but I found failed result and it seems like that issue of internet connection.

I realize that we can add any shell script to check whether the internet up or down but I found that most of the tool do not have this kind of pre-request steps which must be included.

I don't know whether its already included with any tool but here is a request to the community to add your thoughts behind it or share your views if you have any proper solution or suggestions for it.

It is something like below but I am not sure whether any tool applies or not before running any automation scripts/automation job.

https://www.linkedin.com/pulse/why-any-automation-tools-gives-feature-first-check-internet-parikh/

====================================================

if ping -q -c 1 -W 1 mydomain.com >/dev/null; then

echo "The network is up"

else

echo "The network is down"

fi
3
  • What's your issue / question?
    – dvniel
    Feb 17, 2020 at 15:21
  • 2
    I don't know such a tool. But the question is do you really need something like this? If you're testing a program that needs an internet connection and you don't have it, the tests will (should) fail soon anyway, so you just read the log and find out. And if you really fancy such a tool, this is a kind of problem that's easy to solve in many scripting/programming language, so you can easily write a custom fuction/method/keyword and run it as a pre-requisite before your tests fire up.
    – pavelsaman
    Feb 17, 2020 at 16:05
  • 1
    I think @trashpanda question is "You just wrote this tool using ping - what is your question actually? Feb 17, 2020 at 16:43

2 Answers 2

2

I like this question.

It's true, many of the tools and languages and test frameworks could benefit from something like this. However this isn't really a forum where we get to 'ask vendors to please implement features'.

This also relates to having good smoke tests which should do a similar thing. Check super basic things like status code 200 vs 404. Having the test suite abort if certain smoke tests fail is another feature that would certainly be nice, but you're probably gonna have to build it yourself. The are pros and cons to doing that (flexibility vs basic need skills).

1
  • 1
    Glad to see my daily "downvoter no comments" is up today. How can I improve if you don't tell me the issue ? Feb 18, 2020 at 16:21
2

I suppose there is no such generic tool since the requirements are too unclear, why check just internet connection ?

Most test frameworks have a pre suite or pre test step where you can easily implement your own logic according to your needs.

In one of my previous project we checked for disk space, that the router is properly configured, that the screen size matches what we expect and a couple more pre conditions.

In another project agents were assigned based on a set of pre conditions where Internet connection was one of them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.