You can't test of various values of the "input" n, because n isn't an input. It's a hard-coded constant in the program. To test with different values of n you need to change the source code, recompile and re-run. CodeRunner doesn't do that, and nor does any standard program testing environment, as far as I know.
In order to test a program you need a specification to test against. That particular program would appear to have a specification like:
Write a program to compute if the number 153 is an Armstrong number or not. The program should print "armstrong number" if it is or "Not armstrong number" otherwise.
The test for such a program is just to run it and see if it prints the appropriate one of those two outputs.
If you wish to have a program that works with different values of n you have to pose a different question. For example, you might ask:
- Write a Java method boolean isArmstrong(int n) that returns true if n is an armstrong number, or false otherwise. Or
- Write a Java program that reads an integer from standard input and prints "armstrong number" is the number read is an armstrong number, or "Not armstrong number" otherwise.
The first of these would be a "Java method" question, the second a "Java program" question.
See the second half of the Some C and Java questions quiz for examples. The XML exports of these questions are supplied in the CodeRunner distribution file simpledemoquestions.xml.
Note that if you are catering for learners you can provide students with a skeleton outline of the required answer via the Answer preload. This might include the code that reads the number from standard input, for example.