soumya ravindranath

Ranch Hand
+ Follow
since Jan 26, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by soumya ravindranath

Hi,

I am not able to figure out CruiseControl's working method. Any hint about where I could look would be a great help, please.

We have CruiseControl set up for the java project, that fetches from subversion and builds fine. The problem is with sending mails.

There is a project where the build fails always, currently. The batch file that is called from CruiseControl to build the project, not only sets an errorstring but also returns an error code. At the command prompt, I see that these are recognized and CruiseControl reports 'build failed'. However, when I put in the <email> settings directly under <publishers> or inside <onfailure> it doesn't send any mail. Instead, if I put the <email> under <onsuccess>, it sends it. Why does this happen ?

Thanks in advance,
Soumya
13 years ago
An interesting thread.

In India, one moves into English medium of instruction at least in the 11th grade (that is, if one has been studying in vernacular medium until then, otherwise it's English all along). We spend about 7 hours a day at school, filled with various curricula. Except for one(or two) language subject, all others are taught in English. I would expect most of the visitors to this forum to be at least university graduates or even post graduates. When I look at this topic with this background info, I can understand what Maneesh is trying to say.
15 years ago
It was scary initially, but I do this everyday on a slope next to our home now effortlessly. Be on first gear, keep the brake pressed and then start releasing the clutch ever so slowly. You will soon feel the engine shudder, that's your cue, the car won't move either way if you now release the brake. Take it from there by accelerating slowly and releasing the clutch further. If you do it too fast as a beginner, engine might switch off. I have tried practising this on reverse gear up the underground garage, it works perfect
16 years ago
I really appreciate these quick responses.

well, what I meant was that, I call the same method in my class and that only the input data varies. I understand what you meant, of course, what you say about asserts being different is absolutely true.

thanks again!
16 years ago
thanks. I must now take it up with the one who has already written the partial all-in-one test.
Writing and rewriting test for existing code is sure tough
16 years ago
Hi,

thanks a lot for your response. I am still under confusion. I hope you will spare some time...

Let me try to put my details a bit more concretely.
My method process n number of data files

I have to test E.g.

1. measure time taken for 100 input files
2. measure time taken for 500 input files etc.
3. assert certain condition when an input file is corrupt

Now, the the calls I make to my class that is tested are the same for all the 3 conditions. Only the test data setup (done by the testcase itself) varies. So, how would I go about it ? I have only one testMyMethod() in my MyClassTest.java.

Do you mean, I should be writing testMethodCondition1(), testMethodCondition2(), testMethodCondition3() and so on... ?

I could do some more trial and error, but I am running out of time to make a decision... Could you please throw some light ?

thanks,
Soumya.
16 years ago
Hi,

I have a method that processes files and converts into XML. Depending on the input file formats, number of files, etc. the method behaves differently. (if the input content format is wrong, an exception is thrown or if the input file extension is wrong, another exception is thrown ... and so on..).
With JUNIT, I get a Testcase 'testMyMethod()'. Now is it normal practice to do all of the following in this one method ? Or should each condition be tested in a separate test method ?

1. create test data corresponding to condition no.1
2. call the test method in the class, assert output
3. delete the test data
4. create test data corresponding to condition no.2
5. step 2
:
:

thanks in advance,
Soumya.
16 years ago
Thank you very much, that works for my example.
Yes, I was about to post it in Java forum, but then seeing another regex question here, changed my mind...

Further, I don't still quite get the regex writing well. Could you please explain what exactly the second group in the pattern does ?

thanks in advance,
soumya
[ April 28, 2006: Message edited by: soumya ravindranath ]
17 years ago
Hi,

that makes perfect sense! I am trying to get this greedy matching to change to non-greedy ( though I expected .*? to make a non-greedy match in the first place ), but to no avail. Any suggestion how I can improve this regex to behave the way I require ?
thanks,
Soumya.
17 years ago
Hi,

I need to replace special characters when they occur in certain places. The following method works well except for the first occurence of the pattern. I am trying hard to debug, but am getting nowhere. Could anyone please see what is going wrong here ?

The special characters should be replaced only when they occur before the '|' sign. But in the result as you see, in the first occurence, the replacement is made to both sides of '|' and in the rest of the text it is done correctly.

My search text sample -


[first name�|firstname�] this is my page, please go through it and send me feedback. [cchrp|Chris Harp] my page is open to all
[G�nterL�her|G�nter L�her] Replace the sp.characters here please!


Current result after replacement - ( I am trying to escape HTML for correct display here, hence the extra whitespaces )
[first name&s zlig;|firstname&s zlig;] this is my page, please go through it and send me feedback. [cchrp|Chris Harp] my page is open to all [G&u uml ;nterL&o uml ;her|G�nter L�her] Replace the sp.characters here please!


thank you,
Soumya
[ April 27, 2006: Message edited by: soumya ravindranath ]
17 years ago
Hi,

I googled and found only perforce-user@perforce.com and nothing further. Does anyone know a mailing list for perforce-admins ?

Thanks,
Soumya.
Hi,

I didn't come up with any useful threads on search, so here I go.

I am trying the sample Notepad (under jdk1.5 sample) application using Java Web Start. This is my apache/htdocs/Notepad/notepad.jnlp



When I access the notepad.jnlp from local as in http://localhost:8080/Notepad/notepad.jnlp, the application gets launched perfect.
I tried from another machine on the net and I get the following error after the initial screen with the application name, on accessing http://myIP:8080/Notepad/notepad.jnlp


Resource could not be loaded:
http://myIP:8080/Notepad/notepad.jnlp

JNLPException[category: Download-Error : Exception: java.io.IOException : LaunchDesc: null ] at com.sun.javaws.cache.DownloadProtocol.doDownload(Unknown Source) at com.sun.javaws.cache.DownloadProtocol.getLaunchFile(Unknown Source) at com.sun.javaws.LaunchDownload.getUpdatedLaunchDesc(Unknown Source) at com.sun.javaws.Launcher.downloadResources(Unknown Source) at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source) at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source) at com.sun.javaws.Launcher.run(Unknown Source) at java.lang.Thread.run(Unknown Source)

Wrapped Exception:

java.io.IOException at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at com.sun.javaws.net.BasicNetworkLayer.doRequest(Unknown Source) at com.sun.javaws.net.BasicNetworkLayer.doGetRequest(Unknown Source) at com.sun.javaws.cache.DownloadProtocol.doDownload(Unknown Source) at com.sun.javaws.cache.DownloadProtocol.getLaunchFile(Unknown Source) at com.sun.javaws.LaunchDownload.getUpdatedLaunchDesc(Unknown Source) at com.sun.javaws.Launcher.downloadResources(Unknown Source) at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source) at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source) at com.sun.javaws.Launcher.run(Unknown Source) at java.lang.Thread.run(Unknown Source)Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: http://myIP:8080/Notepad/notepad.jnlp at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at java.net.HttpURLConnection.getResponseCode(Unknown Source) ... 10 more



I tried the same after signing the jar. The error remains the same.
The index.html in the same directory loads on the remote browser. I have also made the appropriate entry in apache's mime.types file.

Could someone help ?
thanks in advance,
Soumya.
18 years ago
Hi,

I have a set of classes that are kind of customized wrappers for sshtools secure ftp classes. Basically, my classes take care of connecting to the right server using a config file, transfer files from a number of local directories to a certain location on the server, log messages into a logfile and to the database.

I am not able to figure out what kind of unit test cases I might write for this situation. Do you know of good practical test case writing guide/s ? Or can you suggest a couple of example test cases in this case ?

Thanks,
Soumya.
18 years ago
One of the many,

The Hitchhiker's Guide to the Galaxy ( Now I don't panic come what may )
18 years ago