• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Testing XML to JSON converter  RSS feed

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello! 😀

I created a xml to json converting library.
It allows to convert xml to json.

I need help with testing it.

I prepared a java/swing application.

It is available here:

https://github.com/javadev/underscore-java/releases/download/test/example.jar

Execution instruction:
- download jar file
- start in command line java -jar example.jar

Have a nice testing!
Screenshot_64.png
[Thumbnail for Screenshot_64.png]
 
Sheriff
Posts: 23714
50
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have a problem with this application? If so, what is it?

It's very unlikely that anybody will want to download your application and spend any time looking for problems.

But, welcome to the Ranch!
 
Valentyn Kolesnikov
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Thank you for your messsge.

I am looking for cases there convreting is not working.

Kind regards, Valentyn
 
Paul Clapham
Sheriff
Posts: 23714
50
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And do you have a test plan? Looking for examples where the code doesn't work is a good start; creating them is what you want to do. You need to imagine situations where the conversion will break.
 
Valentyn Kolesnikov
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, I don't have a test plan. Only some unit tests.

Kind regards, Valentyn
 
Paul Clapham
Sheriff
Posts: 23714
50
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unit tests are a good start. Do you have a full description of the problem which says "An element must be mapped to this JSON construct" and so on? A description like that would lead to a whole lot of tests. And then there are possible differences between the XML spec and the JSON spec; for example is it possible to have an XML element name which doesn't convert into valid JSON?
 
Valentyn Kolesnikov
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't have a document with full description of the problem which says "An element must be mapped to this JSON construct".

Xml to json works good, json to xml not as good as I wish.

Kind regards, Valentyn
 
Paul Clapham
Sheriff
Posts: 23714
50
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Valentyn Kolesnikov wrote:I don't have a document with full description of the problem which says "An element must be mapped to this JSON construct".



If the program doesn't have specs then, yeah, it's hard to test it.

json to xml not as good as I wish



Well, it looks to me like there are JSON documents which can't be converted to well-formed XML. you should have tests to confirm that.
 
Valentyn Kolesnikov
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We may to check double converting xml to json and json to xml. We need a set of xml files in this case.

Kind regards, Valentyn
 
Valentyn Kolesnikov
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
New version of program is available!

What's new:

- Improved json to xml converting with attributes.

Url: https://github.com/javadev/underscore-java/releases/download/test/example.jar

Kind regards, Valentyn
Screenshot_68.png
[Thumbnail for Screenshot_68.png]
 
Valentyn Kolesnikov
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
New version was released 2018-08-25:

- Improved xmlelement names convertion in json to xml.

It is available here:
https://github.com/javadev/underscore-java/releases/download/test/example.jar
https://github.com/javadev/underscore-java/releases/download/test/example.exe

Kind regards, Valentyn
Screenshot_70.png
[Thumbnail for Screenshot_70.png]
 
Valentyn Kolesnikov
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, all!

After intensive testing new version was released!

Thanks all for support.

It is available here:

https://github.com/javadev/underscore-java/releases/download/test/example.jar

Kind regards, Valentyn
release-1.0.PNG
[Thumbnail for release-1.0.PNG]
 
Saloon Keeper
Posts: 9254
177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have the source available somewhere? I prefer to compile the application myself.
 
Valentyn Kolesnikov
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Thank you for your message.

Source codes in the same repository with binary file.

No testing needed btw. Program was released.

Kind regards, Valentyn
 
Valentyn Kolesnikov
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, all!

The new version was released!

- Improved attribute order while reading xml
- Added encoding support for xml files

It is available here:

https://github.com/javadev/underscore-java/releases/download/test/xmltojson.exe
https://github.com/javadev/underscore-java/releases/download/test/xmltojson.jar

Kind regards, Valentyn
version2.0.png
[Thumbnail for version2.0.png]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!