+ Start a Discussion
Rohit TripathiRohit Tripathi 

Creating Data in AuthSession Object during Testing

Hi All,

I created a class which selects live sessions from AuthSession object filtering on the basis of createddatetime and terminate those sessions. When I created test class, I am not able to write any data in AuthSession object. Any idea or way to populate some data in AuthSession object and create some sessions with different createddatetime. 

Any help is greatly appreciated. 
Jackson SegalaJackson Segala
Any updates? any workaround? 
Jackson SegalaJackson Segala
Hi, thanks for the reply! But in the testclass, the AuthSession is not created through the Site.Login method, neither if i use a System.runAs, how could i simulate this?