Hi Guys,I am new to AEM development and trying to create Junit(Version
4) test cases for my servlet. I am calling an external API and getting
JSON data rates in response, during this i am using OSGi configurations
for few api related information. I am getting null pointer exception
during the test run. Can anyone help me what i am missing here, below
are my servlet and test classes code.Servlet:import
Hi @Vijayalakshmi_S ,You mean to say, we must use OSGi config values in
Test class? is there any way we can get the values from config manager
like we are getting in main class? Thanks for sharing the info about
Hi @Mayank_Tiwari , Thanks for sharing these, found some similar
but here OSGI configuration variables are predefined in Test class, in
my case i do not want to define them either in my main servlet or test
class. Could you help, how we can do that?
Hi @BrianKasingli , Thank you for sharing this, it doesn't have any Http
request details. My request contains an external API and also with OSGi
configurations defined in console.This is some helpful solution, but
OSGI configuration variables are predefined in Test class, in my case i
do not want to define them in my main servlet or test class. Could you
help me how we can do that?
Hi Guys, Can anyone help me in creating Junit test cases for my servlet.
I am new to AEM development and not aware of Junit thing. I create below
servlet which will retrive rates from an external API in JSON format.so
plz help for unit testing. i need unit testing script for this code,
this my code.import java.io.IOException;import